Chromium Code Reviews| Index: lib/compiler/implementation/scanner/scanner.dart |
| diff --git a/lib/compiler/implementation/scanner/scanner.dart b/lib/compiler/implementation/scanner/scanner.dart |
| index 84af8ad0ab1f9ca936711c4a9a960fd85aa11810..376056a5c49a2258fe46ff3af300ec90c4f6062c 100644 |
| --- a/lib/compiler/implementation/scanner/scanner.dart |
| +++ b/lib/compiler/implementation/scanner/scanner.dart |
| @@ -106,6 +106,10 @@ class AbstractScanner<T extends SourceString> implements Scanner { |
| return advance(); |
| } |
| + if ($r === next) { |
| + return tokenizeRawStringKeywordOrIdentifier(next, true); |
| + } |
| + |
| if ($a <= next && next <= $z) { |
| return tokenizeKeywordOrIdentifier(next, true); |
| } |
| @@ -230,6 +234,7 @@ class AbstractScanner<T extends SourceString> implements Scanner { |
| return tokenizeSlashOrComment(next); |
| } |
| + // TODO(aprelev@gmail.com) Remove deprecated raw string literals |
| if (next === $AT) { |
| return tokenizeAtOrRawString(next); |
| } |
| @@ -620,6 +625,16 @@ class AbstractScanner<T extends SourceString> implements Scanner { |
| } |
| } |
| + int tokenizeRawStringKeywordOrIdentifier(int next, bool allowDollar) { |
|
ahe
2012/09/11 06:04:34
allowDollar is always true. The parameter is not n
aam-me
2012/09/12 02:12:38
Done.
|
| + int nextnext = peek(); |
| + if (nextnext === $DQ || nextnext === $SQ) { |
| + int start = byteOffset; |
| + next = advance(); |
| + return tokenizeString(next, start, true); |
| + } |
| + return tokenizeKeywordOrIdentifier(next, allowDollar); |
| + } |
| + |
| int tokenizeKeywordOrIdentifier(int next, bool allowDollar) { |
| KeywordState state = KeywordState.KEYWORD_STATE; |
| int start = byteOffset; |