ssm-lang / sslang

A language built atop the Sparse Synchronous Model
BSD 3-Clause "New" or "Revised" License
18 stars 0 forks source link

Scanner Breaks on Character Literals #125

Open EmilySillars opened 1 year ago

EmilySillars commented 1 year ago

It looks like one of the two most recent commits to the scanner causes a bug on character literals. Input:

main cin cout =
 let x = 'h' // character literals should turn into integers, right?
 after 1, cout <- x
 ()

Expected Output:

h

Running at current head of main:

./runtests.sh tests/check_single_quotes.ssl
check_single_quotes...FAILED
...
###### Testing check_single_quotes
stack exec sslc -- tests/check_single_quotes.ssl > out/check_single_quotes.c
ParseError (ErrorMsg "Could not escape string: ''")
###### FAILED

If I roll back three commits, to commit: e4d8bf2b06d3ee8ecd3793e81198bd85d69d651b

./runtests.sh tests/check_single_quotes.ssl
check_single_quotes...OK