]> ocean-lang.org Git - ocean/commit - csrc/oceani-tests.mdc
parsergen - fix newline parsing (again)
authorNeilBrown <neil@brown.name>
Sun, 26 May 2019 05:04:43 +0000 (15:04 +1000)
committerNeilBrown <neil@brown.name>
Sun, 26 May 2019 05:04:43 +0000 (15:04 +1000)
commit97b1522ec76e072e927ef3e5f1f917f2a92236db
treea3a9d17a488c031c21f6589819ab48a0e5ffc2cf
parent1330688ecf4b573ec82fc21309113dc5c35be75c
parsergen - fix newline parsing (again)

Add a test-case to oceani-tests.mdc which fails, but shouldn't.
It fails because expressions are treated as line-like, so newlines
aren't ignored.

I realize that having linelike symbols being those that are followed by
a newline really doesn't work.
So go back to the original idea that "linelike symbols are those which
contain a newline".

Then a state starts a line if it is at the start of a linelike symbol.

This simplifies the code, seems to work correctly for existing tests,
and allows the new test to pass.

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