Skip to content

Commit

Permalink
Fix bug mirah#25 for SStrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixvf committed Jul 21, 2015
1 parent 7eede3e commit 2d8fabc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/mirahparser/impl/MirahLexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,20 @@ public Tokens lex(MirahLexer l, Input i) {
if (isEscape(i)) {
return Tokens.tEscape;
}
break;
case '\n':
l.noteNewline();
}
readRestOfString(i);
readRestOfString(l, i);
return Tokens.tStringContent;
}

private void readRestOfString(Input i) {
private void readRestOfString(MirahLexer l, Input i) {
int c = 0;
for (c = i.read(); c != EOF;c = i.read()) {
if (c == '\n') {
l.noteNewline();
}
if (c == '\'') {
i.backup(1);
break;
Expand Down

0 comments on commit 2d8fabc

Please sign in to comment.