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

Escaping in template literals #619

Closed
avdg opened this Issue Jun 23, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@avdg

avdg commented Jun 23, 2016

Given grammar

EscapeCharacter :: one of
 `'` `"` `\` `b` `f` `n` `r` `t` `v`

EscapeSequence ::
 CharacterEscapeSequence
 `0` [lookahead <! DecimalDigit] (or in non strict) LegacyOctalEscapeSequence
 HexEscapeSequence
 UnicodeEscapeSequence

TemplateCharacter ::
 `$` [lookahead != `{` ]
 `\` EscapeSequence
 LineContinuation
 LineTerminatorSequence
 SourceCharacter but not one of ` `` or `\` or `$` or LineTerminator

Is it possible to add ` to those escape characters as well, since otherwise there is no "official" way to escape those characters as well.

Thanks in advance.

@avdg avdg changed the title from Escaping in string literals to Escaping in template literals Jun 23, 2016

@avdg

This comment has been minimized.

Show comment
Hide comment
@avdg

avdg Jun 23, 2016

Uh nevermind: I've overread this apparently

CharacterEscapeSequence ::
 SingleEscapeCharacter
 NonEscapeCharacter

NonEscapeCharacter ::
 SourceCharacter but not one of EscapeCharacter or LineTerminator

avdg commented Jun 23, 2016

Uh nevermind: I've overread this apparently

CharacterEscapeSequence ::
 SingleEscapeCharacter
 NonEscapeCharacter

NonEscapeCharacter ::
 SourceCharacter but not one of EscapeCharacter or LineTerminator

@avdg avdg closed this Jun 23, 2016

@avdg

This comment has been minimized.

Show comment
Hide comment
@avdg

avdg Jun 23, 2016

(actually I don't know if it's better to keep this open and get it fixed in the spec)

avdg commented Jun 23, 2016

(actually I don't know if it's better to keep this open and get it fixed in the spec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment