-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
escape characters are no longer allowed inside triple-quote strings -…
…- this makes it easier to include entire programs in this kind of string
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc6f7a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about programs with triple-quote inside? if it's only ometajs syntax, maybe better place for triple-quote rule is ometajs-gramma?
cc6f7a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about them?
AFAIK triple-quoted strings are not really part of Javascript. My parser accepts them because they're useful, and IMO they're even more useful if escape characters are not allowed inside. Sure, that means you can't nest triple-quoted strings, but that doesn't bother me. And if you want to be able to escape characters, you can always use single- or double-quoted strings.
cc6f7a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, if it is not part of the language, but useful extension of syntax in context of Ometa/JS, is not it would be better to move it to BSOMetaJSParser (instead of BSJSParser). At the same time it explicitly distinguish the two languages, and js-programs can be used in Ometa/JS in triple-quotes. Correct me if I'm wrong, the main use case for programs within strings for this.