OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 bool Scanner::ScanRegExpFlags() { | 1070 bool Scanner::ScanRegExpFlags() { |
1071 // Scan regular expression flags. | 1071 // Scan regular expression flags. |
1072 LiteralScope literal(this); | 1072 LiteralScope literal(this); |
1073 while (unicode_cache_->IsIdentifierPart(c0_)) { | 1073 while (unicode_cache_->IsIdentifierPart(c0_)) { |
1074 if (c0_ != '\\') { | 1074 if (c0_ != '\\') { |
1075 AddLiteralCharAdvance(); | 1075 AddLiteralCharAdvance(); |
1076 } else { | 1076 } else { |
1077 if (!ScanLiteralUnicodeEscape()) { | 1077 if (!ScanLiteralUnicodeEscape()) { |
1078 break; | 1078 break; |
1079 } | 1079 } |
| 1080 Advance(); |
1080 } | 1081 } |
1081 } | 1082 } |
1082 literal.Complete(); | 1083 literal.Complete(); |
1083 | 1084 |
1084 next_.location.end_pos = source_pos() - 1; | 1085 next_.location.end_pos = source_pos() - 1; |
1085 return true; | 1086 return true; |
1086 } | 1087 } |
1087 | 1088 |
1088 } } // namespace v8::internal | 1089 } } // namespace v8::internal |
OLD | NEW |