Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow double-quote and backslash in string and char literals #100

Closed
julianhyde opened this issue Jan 14, 2022 · 0 comments
Closed

Allow double-quote and backslash in string and char literals #100

julianhyde opened this issue Jan 14, 2022 · 0 comments

Comments

@julianhyde
Copy link
Collaborator

Allow double-quote and backslash in string and char literals. Per Standard ML syntax, string and char literals are enclosed in double-quotes, and double-quotes and backslash are escaped using a backslash.

Here are some examples (run in sml-nj v110.79):

- "a string literal with a \"quoted\" word";
val it = "a string literal with a \"quoted\" word" : string
- "a string with a backslash \\ and a forward slash /";
val it = "a string with a backslash \\ and a forward slash /" : string
- #"a";
val it = #"a" : char
- #"\"";
val it = #"\"" : char
- #"\\";
val it = #"\\" : char
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant