]> ocean-lang.org Git - ocean/commit
scanner: fix bug with indent at start of node.
authorNeilBrown <neil@brown.name>
Sat, 8 Jun 2019 10:18:35 +0000 (20:18 +1000)
committerNeilBrown <neil@brown.name>
Sat, 8 Jun 2019 10:18:35 +0000 (20:18 +1000)
commit19784ed2b95e5b5241207361eea0ff510ff416d7
treec013b1fe1ba0d3622bbea2a64ea1b1b7df71ca4e
parent151e984bb8300e4eb3f7cdf41135f9a3b0261fd5
scanner: fix bug with indent at start of node.

If we find an indent, we assume there are delayed newlines
to comsume.
This is often true, but not at the start of a node.
So don't decrement delayed_lines if it is already zero.

Add the test case that found this bug for me.

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