Skip to content

Commit

Permalink
Closes #143 (removes backtick quoted verbatim strings and quoted verb…
Browse files Browse the repository at this point in the history
…atim string delimiter escaping).
  • Loading branch information
JarrettBillingsley committed Nov 9, 2014
1 parent ad4395a commit d35ca0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
5 changes: 2 additions & 3 deletions crocgrammar.txt
Expand Up @@ -88,9 +88,8 @@ EscapeSequence:
\ DecimalDigit (DecimalDigit DecimalDigit?)?

VerbatimString:
@" (Character | EndOfLine | "")* "
@' (Character | EndOfLine | '')* '
@` (Character | EndOfLine | ``)* `
@" (Character | EndOfLine)* "
@' (Character | EndOfLine)* '
[={n}[ (Character | EndOfLine)* ]={n}]

IntLiteral:
Expand Down
13 changes: 2 additions & 11 deletions src/croc/compiler/lexer.cpp
Expand Up @@ -652,16 +652,7 @@ namespace croc
default:
_default:
if(!escape && mCharacter == delimiter)
{
if(lookaheadChar() == delimiter)
{
buf.add(delimiter);
nextChar();
nextChar();
}
else
break;
}
break;
else
{
if(escape && mCharacter == delimiter)
Expand Down Expand Up @@ -1240,7 +1231,7 @@ namespace croc

case '@':
nextChar();
if(mCharacter == '\"' || mCharacter == '\'' || mCharacter == '`')
if(mCharacter == '\"' || mCharacter == '\'')
{
mTok.stringValue = readStringLiteral(false);
TOK(Token::StringLiteral);
Expand Down

0 comments on commit d35ca0f

Please sign in to comment.