govaluate icon indicating copy to clipboard operation
govaluate copied to clipboard

replaced lexerStream with text/scanner.Scanner

Open generikvault opened this issue 8 years ago • 3 comments

Hi,

I've replaced the lexerStream type with the golang text/scanner.Scanner type. My commit causes syntax changes with string escaping. Now there is a real difference between single and double quotes.

'abc" is no longer a vailid string. In exchange "abc's", 'a"b"c' and '\u263a' are valid now.

generikvault avatar Sep 12 '17 15:09 generikvault

I'm still going over the change, but all the tests are passing and i think the change to quoting is fine - it always felt like a bug to allow something like 'abc" to be read as a valid string. So it seems like this change is all good, but i'm still going over what the scanner parses that the hand-rolled lexerStream didn't, and looking for any possible conflicts.

Knetic avatar Sep 13 '17 16:09 Knetic

This change is good, but I'm going to wait to merge until a new major version is ready - this is a big enough API break that it'll probably affect downstreams.

Knetic avatar Oct 22 '17 00:10 Knetic

ok, cool

generikvault avatar Oct 23 '17 06:10 generikvault