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

Single Quoted Strings are missing #20

Open
trijezdci opened this issue Jun 16, 2023 · 0 comments
Open

Single Quoted Strings are missing #20

trijezdci opened this issue Jun 16, 2023 · 0 comments

Comments

@trijezdci
Copy link

trijezdci commented Jun 16, 2023

<string>"</string>

Modula-2 uses both double and single quoted strings.

They are both necessary because a string that contains a single-quote or apostrophe can only be double-quoted, and a string that contains a double-quote can only be single-quoted because there are no escape sequences to escape quotes.

SingleQuotedString :=
"'" PrintableCharacterExceptSingleQuote* "'"
;

DoubleQuotedString :=
'"' PrintableCharacterExceptDoubleQuote* '"'
;

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