Skip to content

Scanner Breaks on Character Literals #125

@EmilySillars

Description

@EmilySillars

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: e4d8bf2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendEngineering issues related to the frontend subsystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions