]> ocean-lang.org Git - ocean/commit
scanner: fix at_son()
authorNeilBrown <neil@brown.name>
Sat, 8 Jun 2019 04:26:15 +0000 (14:26 +1000)
committerNeilBrown <neil@brown.name>
Sat, 8 Jun 2019 04:26:15 +0000 (14:26 +1000)
commitc040191336b755321af667a0251b97782d8eed71
treef9c6424d22e833354cfa0580eddc27b8c8dac446
parentedb6ad84004330f82b5b4d3c96e47c77c80e9b3f
scanner: fix at_son()

Current test for "at start of node" is broken for 2 reasons.

1/ it doesn't account for the node-indent chars that are stripped
   off by do_strip()
2/ it check the ->offset *after* a character has been extracted,
   it needs to check the offset from before, which is in ->prev_offset

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