| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class Tokenizer extends TokenizerBase { | 5 class Tokenizer extends TokenizerBase { |
| 6 TokenKind tmplTokens; | 6 TokenKind tmplTokens; |
| 7 | 7 |
| 8 bool _selectorParsing; | 8 bool _selectorParsing; |
| 9 | 9 |
| 10 Tokenizer(SourceFile source, bool skipWhitespace, [int index = 0]) | 10 Tokenizer(SourceFile source, bool skipWhitespace, [int index = 0]) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 return finishQuotedAttrValue( | 73 return finishQuotedAttrValue( |
| 74 tmplTokens.tokens[TokenKind.DOUBLE_QUOTE]); | 74 tmplTokens.tokens[TokenKind.DOUBLE_QUOTE]); |
| 75 } else if (isAttributeValueStart(_peekChar())) { | 75 } else if (isAttributeValueStart(_peekChar())) { |
| 76 return finishAttrValue(); | 76 return finishAttrValue(); |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 return _finishToken(TokenKind.EQUAL); | 79 return _finishToken(TokenKind.EQUAL); |
| 80 case tmplTokens.tokens[TokenKind.SLASH]: | 80 case tmplTokens.tokens[TokenKind.SLASH]: |
| 81 if (_maybeEatChar(tmplTokens.tokens[TokenKind.GREATER_THAN])) { | 81 if (_maybeEatChar(tmplTokens.tokens[TokenKind.GREATER_THAN])) { |
| 82 return _finishToken(TokenKind.END_NO_SCOPE_TAG); // /> | 82 return _finishToken(TokenKind.END_NO_SCOPE_TAG); // /> |
| 83 } else if (_maybeEatChar(tmplTokens.tokens[TokenKind.ASTERISK])) { |
| 84 return finishMultiLineComment(); |
| 83 } else { | 85 } else { |
| 84 return _finishToken(TokenKind.SLASH); | 86 return _finishToken(TokenKind.SLASH); |
| 85 } | 87 } |
| 86 case tmplTokens.tokens[TokenKind.DOLLAR]: | 88 case tmplTokens.tokens[TokenKind.DOLLAR]: |
| 87 if (_maybeEatChar(tmplTokens.tokens[TokenKind.LBRACE])) { | 89 if (_maybeEatChar(tmplTokens.tokens[TokenKind.LBRACE])) { |
| 88 if (_maybeEatChar(tmplTokens.tokens[TokenKind.HASH])) { | 90 if (_maybeEatChar(tmplTokens.tokens[TokenKind.HASH])) { |
| 89 return _finishToken(TokenKind.START_COMMAND); // ${# | 91 return _finishToken(TokenKind.START_COMMAND); // ${# |
| 90 } else if (_maybeEatChar(tmplTokens.tokens[TokenKind.SLASH])) { | 92 } else if (_maybeEatChar(tmplTokens.tokens[TokenKind.SLASH])) { |
| 91 return _finishToken(TokenKind.END_COMMAND); // ${/ | 93 return _finishToken(TokenKind.END_COMMAND); // ${/ |
| 92 } else { | 94 } else { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 } | 299 } |
| 298 | 300 |
| 299 static bool isSlash(int c) { | 301 static bool isSlash(int c) { |
| 300 return (c == 47/* / */); | 302 return (c == 47/* / */); |
| 301 } | 303 } |
| 302 | 304 |
| 303 static bool isCloseTag(int c) { | 305 static bool isCloseTag(int c) { |
| 304 return (c == 62/* > */); | 306 return (c == 62/* > */); |
| 305 } | 307 } |
| 306 } | 308 } |
| OLD | NEW |