]> ocean-lang.org Git - ocean/commit
parsergen: move EOL handling out of shift()
authorNeilBrown <neil@brown.name>
Sat, 13 Nov 2021 22:47:21 +0000 (09:47 +1100)
committerNeilBrown <neil@brown.name>
Sat, 13 Nov 2021 22:50:59 +0000 (09:50 +1100)
commit10db06aed6af588a0ccd05e80a0f50286949d56c
treeb3867db49bd8184fbe991fcbf1a6bfee678468ed
parent4e76641ba6fa31b2cafb16b2452f585ba70a6822
parsergen: move EOL handling out of shift()

shift() is called in several places, and in only one of those is there a
need to make NEWLINE to EOL.

Move the code out of shift() and instead make a second call to shift()
if shifting NEWLINE failed.  I think this make the code clearer.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/parsergen.mdc