| Index: lib/dartdoc/frog/tokenizer.g.dart
|
| diff --git a/lib/dartdoc/frog/tokenizer.g.dart b/lib/dartdoc/frog/tokenizer.g.dart
|
| deleted file mode 100644
|
| index b45e175ce43c961157d9df7b6c0e943d38bba66b..0000000000000000000000000000000000000000
|
| --- a/lib/dartdoc/frog/tokenizer.g.dart
|
| +++ /dev/null
|
| @@ -1,426 +0,0 @@
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE file.
|
| -// Generated by scripts/tokenizer_gen.py.
|
| -
|
| -
|
| -/** A generated file that extends the hand coded methods in TokenizerBase. */
|
| -class Tokenizer extends TokenizerBase {
|
| -
|
| - Tokenizer(SourceFile source, bool skipWhitespace, [int index = 0])
|
| - : super(source, skipWhitespace, index);
|
| -
|
| - Token next() {
|
| - // keep track of our starting position
|
| - _startIndex = _index;
|
| -
|
| - if (_interpStack != null && _interpStack.depth == 0) {
|
| - var istack = _interpStack;
|
| - _interpStack = _interpStack.pop();
|
| - if (istack.isMultiline) {
|
| - return finishMultilineString(istack.quote);
|
| - } else {
|
| - return finishStringBody(istack.quote);
|
| - }
|
| - }
|
| -
|
| - int ch;
|
| - ch = _nextChar();
|
| - switch(ch) {
|
| - case 0: return _finishToken(TokenKind.END_OF_FILE);
|
| - case 32/*' '*/: case 9/*'\t'*/: case 10/*'\n'*/: case 13/*'\r'*/:
|
| - return finishWhitespace();
|
| - case 33/*!*/:
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.NE_STRICT);
|
| - } else {
|
| - return _finishToken(TokenKind.NE);
|
| - }
|
| - } else {
|
| - return _finishToken(TokenKind.NOT);
|
| - }
|
| - case 34/*"*/:
|
| - return finishString(34/*"*/);
|
| - case 35/*#*/:
|
| - if (_maybeEatChar(33/*!*/)) {
|
| - return finishHashBang();
|
| - } else {
|
| - return _finishToken(TokenKind.HASH);
|
| - }
|
| - case 36/*$*/:
|
| - if (_maybeEatChar(34/*"*/)) {
|
| - return finishString(34/*"*/);
|
| - } else if (_maybeEatChar(39/*'*/)) {
|
| - return finishString(39/*'*/);
|
| - } else {
|
| - return finishIdentifier(36/*$*/);
|
| - }
|
| - case 37/*%*/:
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_MOD);
|
| - } else {
|
| - return _finishToken(TokenKind.MOD);
|
| - }
|
| - case 38/*&*/:
|
| - if (_maybeEatChar(38/*&*/)) {
|
| - return _finishToken(TokenKind.AND);
|
| - } else if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_AND);
|
| - } else {
|
| - return _finishToken(TokenKind.BIT_AND);
|
| - }
|
| - case 39/*'*/:
|
| - return finishString(39/*'*/);
|
| - case 40/*(*/:
|
| - return _finishToken(TokenKind.LPAREN);
|
| - case 41/*)*/:
|
| - return _finishToken(TokenKind.RPAREN);
|
| - case 42/*'*'*/:
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_MUL);
|
| - } else {
|
| - return _finishToken(TokenKind.MUL);
|
| - }
|
| - case 43/*+*/:
|
| - if (_maybeEatChar(43/*+*/)) {
|
| - return _finishToken(TokenKind.INCR);
|
| - } else if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_ADD);
|
| - } else {
|
| - return _finishToken(TokenKind.ADD);
|
| - }
|
| - case 44/*,*/:
|
| - return _finishToken(TokenKind.COMMA);
|
| - case 45/*-*/:
|
| - if (_maybeEatChar(45/*-*/)) {
|
| - return _finishToken(TokenKind.DECR);
|
| - } else if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_SUB);
|
| - } else {
|
| - return _finishToken(TokenKind.SUB);
|
| - }
|
| - case 46/*.*/:
|
| - if (_maybeEatChar(46/*.*/)) {
|
| - if (_maybeEatChar(46/*.*/)) {
|
| - return _finishToken(TokenKind.ELLIPSIS);
|
| - } else {
|
| - return _errorToken();
|
| - }
|
| - } else {
|
| - return finishDot();
|
| - }
|
| - case 47/*'/'*/:
|
| - if (_maybeEatChar(42/*'*'*/)) {
|
| - return finishMultiLineComment();
|
| - } else if (_maybeEatChar(47/*'/'*/)) {
|
| - return finishSingleLineComment();
|
| - } else if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_DIV);
|
| - } else {
|
| - return _finishToken(TokenKind.DIV);
|
| - }
|
| - case 48/*0*/:
|
| - if (_maybeEatChar(88/*X*/)) {
|
| - return finishHex();
|
| - } else if (_maybeEatChar(120/*x*/)) {
|
| - return finishHex();
|
| - } else {
|
| - return finishNumber();
|
| - }
|
| - case 58/*:*/:
|
| - return _finishToken(TokenKind.COLON);
|
| - case 59/*;*/:
|
| - return _finishToken(TokenKind.SEMICOLON);
|
| - case 60/*<*/:
|
| - if (_maybeEatChar(60/*<*/)) {
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_SHL);
|
| - } else {
|
| - return _finishToken(TokenKind.SHL);
|
| - }
|
| - } else if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.LTE);
|
| - } else {
|
| - return _finishToken(TokenKind.LT);
|
| - }
|
| - case 61/*=*/:
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.EQ_STRICT);
|
| - } else {
|
| - return _finishToken(TokenKind.EQ);
|
| - }
|
| - } else if (_maybeEatChar(62/*>*/)) {
|
| - return _finishToken(TokenKind.ARROW);
|
| - } else {
|
| - return _finishToken(TokenKind.ASSIGN);
|
| - }
|
| - case 62/*>*/:
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.GTE);
|
| - } else if (_maybeEatChar(62/*>*/)) {
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_SAR);
|
| - } else if (_maybeEatChar(62/*>*/)) {
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_SHR);
|
| - } else {
|
| - return _finishToken(TokenKind.SHR);
|
| - }
|
| - } else {
|
| - return _finishToken(TokenKind.SAR);
|
| - }
|
| - } else {
|
| - return _finishToken(TokenKind.GT);
|
| - }
|
| - case 63/*?*/:
|
| - return _finishToken(TokenKind.CONDITIONAL);
|
| - case 64/*@*/:
|
| - if (_maybeEatChar(34/*"*/)) {
|
| - return finishRawString(34/*"*/);
|
| - } else if (_maybeEatChar(39/*'*/)) {
|
| - return finishRawString(39/*'*/);
|
| - } else {
|
| - return _errorToken();
|
| - }
|
| - case 91/*[*/:
|
| - if (_maybeEatChar(93/*]*/)) {
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.SETINDEX);
|
| - } else {
|
| - return _finishToken(TokenKind.INDEX);
|
| - }
|
| - } else {
|
| - return _finishToken(TokenKind.LBRACK);
|
| - }
|
| - case 93/*]*/:
|
| - return _finishToken(TokenKind.RBRACK);
|
| - case 94/*^*/:
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_XOR);
|
| - } else {
|
| - return _finishToken(TokenKind.BIT_XOR);
|
| - }
|
| - case 123/*{*/:
|
| - return _finishOpenBrace();
|
| - case 124/*|*/:
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_OR);
|
| - } else if (_maybeEatChar(124/*|*/)) {
|
| - return _finishToken(TokenKind.OR);
|
| - } else {
|
| - return _finishToken(TokenKind.BIT_OR);
|
| - }
|
| - case 125/*}*/:
|
| - return _finishCloseBrace();
|
| - case 126/*~*/:
|
| - if (_maybeEatChar(47/*'/'*/)) {
|
| - if (_maybeEatChar(61/*=*/)) {
|
| - return _finishToken(TokenKind.ASSIGN_TRUNCDIV);
|
| - } else {
|
| - return _finishToken(TokenKind.TRUNCDIV);
|
| - }
|
| - } else {
|
| - return _finishToken(TokenKind.BIT_NOT);
|
| - }
|
| - default:
|
| - if (TokenizerHelpers.isIdentifierStart(ch)) {
|
| - return this.finishIdentifier(ch);
|
| - } else if (TokenizerHelpers.isDigit(ch)) {
|
| - return this.finishNumber();
|
| - } else {
|
| - return _errorToken();
|
| - }
|
| - }
|
| -
|
| - }
|
| -
|
| - int getIdentifierKind() {
|
| - final i0 = _startIndex;
|
| - int ch;
|
| - switch (_index - i0) {
|
| - case 2:
|
| - ch = _text.charCodeAt(i0);
|
| - if (ch == 100/*d*/) {
|
| - if (_text.charCodeAt(i0+1) == 111/*o*/) return TokenKind.DO;
|
| - } else if (ch == 105/*i*/) {
|
| - ch = _text.charCodeAt(i0+1);
|
| - if (ch == 102/*f*/) {
|
| - return TokenKind.IF;
|
| - } else if (ch == 110/*n*/) {
|
| - return TokenKind.IN;
|
| - } else if (ch == 115/*s*/) {
|
| - return TokenKind.IS;
|
| - }
|
| - }
|
| - return TokenKind.IDENTIFIER;
|
| - case 3:
|
| - ch = _text.charCodeAt(i0);
|
| - if (ch == 102/*f*/) {
|
| - if (_text.charCodeAt(i0+1) == 111/*o*/ && _text.charCodeAt(i0+2) == 114/*r*/) return TokenKind.FOR;
|
| - } else if (ch == 103/*g*/) {
|
| - if (_text.charCodeAt(i0+1) == 101/*e*/ && _text.charCodeAt(i0+2) == 116/*t*/) return TokenKind.GET;
|
| - } else if (ch == 110/*n*/) {
|
| - if (_text.charCodeAt(i0+1) == 101/*e*/ && _text.charCodeAt(i0+2) == 119/*w*/) return TokenKind.NEW;
|
| - } else if (ch == 115/*s*/) {
|
| - if (_text.charCodeAt(i0+1) == 101/*e*/ && _text.charCodeAt(i0+2) == 116/*t*/) return TokenKind.SET;
|
| - } else if (ch == 116/*t*/) {
|
| - if (_text.charCodeAt(i0+1) == 114/*r*/ && _text.charCodeAt(i0+2) == 121/*y*/) return TokenKind.TRY;
|
| - } else if (ch == 118/*v*/) {
|
| - if (_text.charCodeAt(i0+1) == 97/*a*/ && _text.charCodeAt(i0+2) == 114/*r*/) return TokenKind.VAR;
|
| - }
|
| - return TokenKind.IDENTIFIER;
|
| - case 4:
|
| - ch = _text.charCodeAt(i0);
|
| - if (ch == 99/*c*/) {
|
| - ch = _text.charCodeAt(i0+1);
|
| - if (ch == 97/*a*/) {
|
| - ch = _text.charCodeAt(i0+2);
|
| - if (ch == 108/*l*/) {
|
| - if (_text.charCodeAt(i0+3) == 108/*l*/) return TokenKind.CALL;
|
| - } else if (ch == 115/*s*/) {
|
| - if (_text.charCodeAt(i0+3) == 101/*e*/) return TokenKind.CASE;
|
| - }
|
| - }
|
| - } else if (ch == 101/*e*/) {
|
| - if (_text.charCodeAt(i0+1) == 108/*l*/ && _text.charCodeAt(i0+2) == 115/*s*/ && _text.charCodeAt(i0+3) == 101/*e*/) return TokenKind.ELSE;
|
| - } else if (ch == 110/*n*/) {
|
| - if (_text.charCodeAt(i0+1) == 117/*u*/ && _text.charCodeAt(i0+2) == 108/*l*/ && _text.charCodeAt(i0+3) == 108/*l*/) return TokenKind.NULL;
|
| - } else if (ch == 116/*t*/) {
|
| - ch = _text.charCodeAt(i0+1);
|
| - if (ch == 104/*h*/) {
|
| - if (_text.charCodeAt(i0+2) == 105/*i*/ && _text.charCodeAt(i0+3) == 115/*s*/) return TokenKind.THIS;
|
| - } else if (ch == 114/*r*/) {
|
| - if (_text.charCodeAt(i0+2) == 117/*u*/ && _text.charCodeAt(i0+3) == 101/*e*/) return TokenKind.TRUE;
|
| - }
|
| - } else if (ch == 118/*v*/) {
|
| - if (_text.charCodeAt(i0+1) == 111/*o*/ && _text.charCodeAt(i0+2) == 105/*i*/ && _text.charCodeAt(i0+3) == 100/*d*/) return TokenKind.VOID;
|
| - }
|
| - return TokenKind.IDENTIFIER;
|
| - case 5:
|
| - ch = _text.charCodeAt(i0);
|
| - if (ch == 97/*a*/) {
|
| - if (_text.charCodeAt(i0+1) == 119/*w*/ && _text.charCodeAt(i0+2) == 97/*a*/ && _text.charCodeAt(i0+3) == 105/*i*/ && _text.charCodeAt(i0+4) == 116/*t*/) return TokenKind.AWAIT;
|
| - } else if (ch == 98/*b*/) {
|
| - if (_text.charCodeAt(i0+1) == 114/*r*/ && _text.charCodeAt(i0+2) == 101/*e*/ && _text.charCodeAt(i0+3) == 97/*a*/ && _text.charCodeAt(i0+4) == 107/*k*/) return TokenKind.BREAK;
|
| - } else if (ch == 99/*c*/) {
|
| - ch = _text.charCodeAt(i0+1);
|
| - if (ch == 97/*a*/) {
|
| - if (_text.charCodeAt(i0+2) == 116/*t*/ && _text.charCodeAt(i0+3) == 99/*c*/ && _text.charCodeAt(i0+4) == 104/*h*/) return TokenKind.CATCH;
|
| - } else if (ch == 108/*l*/) {
|
| - if (_text.charCodeAt(i0+2) == 97/*a*/ && _text.charCodeAt(i0+3) == 115/*s*/ && _text.charCodeAt(i0+4) == 115/*s*/) return TokenKind.CLASS;
|
| - } else if (ch == 111/*o*/) {
|
| - if (_text.charCodeAt(i0+2) == 110/*n*/ && _text.charCodeAt(i0+3) == 115/*s*/ && _text.charCodeAt(i0+4) == 116/*t*/) return TokenKind.CONST;
|
| - }
|
| - } else if (ch == 102/*f*/) {
|
| - ch = _text.charCodeAt(i0+1);
|
| - if (ch == 97/*a*/) {
|
| - if (_text.charCodeAt(i0+2) == 108/*l*/ && _text.charCodeAt(i0+3) == 115/*s*/ && _text.charCodeAt(i0+4) == 101/*e*/) return TokenKind.FALSE;
|
| - } else if (ch == 105/*i*/) {
|
| - if (_text.charCodeAt(i0+2) == 110/*n*/ && _text.charCodeAt(i0+3) == 97/*a*/ && _text.charCodeAt(i0+4) == 108/*l*/) return TokenKind.FINAL;
|
| - }
|
| - } else if (ch == 115/*s*/) {
|
| - if (_text.charCodeAt(i0+1) == 117/*u*/ && _text.charCodeAt(i0+2) == 112/*p*/ && _text.charCodeAt(i0+3) == 101/*e*/ && _text.charCodeAt(i0+4) == 114/*r*/) return TokenKind.SUPER;
|
| - } else if (ch == 116/*t*/) {
|
| - if (_text.charCodeAt(i0+1) == 104/*h*/ && _text.charCodeAt(i0+2) == 114/*r*/ && _text.charCodeAt(i0+3) == 111/*o*/ && _text.charCodeAt(i0+4) == 119/*w*/) return TokenKind.THROW;
|
| - } else if (ch == 119/*w*/) {
|
| - if (_text.charCodeAt(i0+1) == 104/*h*/ && _text.charCodeAt(i0+2) == 105/*i*/ && _text.charCodeAt(i0+3) == 108/*l*/ && _text.charCodeAt(i0+4) == 101/*e*/) return TokenKind.WHILE;
|
| - }
|
| - return TokenKind.IDENTIFIER;
|
| - case 6:
|
| - ch = _text.charCodeAt(i0);
|
| - if (ch == 97/*a*/) {
|
| - if (_text.charCodeAt(i0+1) == 115/*s*/ && _text.charCodeAt(i0+2) == 115/*s*/ && _text.charCodeAt(i0+3) == 101/*e*/ && _text.charCodeAt(i0+4) == 114/*r*/ && _text.charCodeAt(i0+5) == 116/*t*/) return TokenKind.ASSERT;
|
| - } else if (ch == 105/*i*/) {
|
| - if (_text.charCodeAt(i0+1) == 109/*m*/ && _text.charCodeAt(i0+2) == 112/*p*/ && _text.charCodeAt(i0+3) == 111/*o*/ && _text.charCodeAt(i0+4) == 114/*r*/ && _text.charCodeAt(i0+5) == 116/*t*/) return TokenKind.IMPORT;
|
| - } else if (ch == 110/*n*/) {
|
| - ch = _text.charCodeAt(i0+1);
|
| - if (ch == 97/*a*/) {
|
| - if (_text.charCodeAt(i0+2) == 116/*t*/ && _text.charCodeAt(i0+3) == 105/*i*/ && _text.charCodeAt(i0+4) == 118/*v*/ && _text.charCodeAt(i0+5) == 101/*e*/) return TokenKind.NATIVE;
|
| - } else if (ch == 101/*e*/) {
|
| - if (_text.charCodeAt(i0+2) == 103/*g*/ && _text.charCodeAt(i0+3) == 97/*a*/ && _text.charCodeAt(i0+4) == 116/*t*/ && _text.charCodeAt(i0+5) == 101/*e*/) return TokenKind.NEGATE;
|
| - }
|
| - } else if (ch == 114/*r*/) {
|
| - if (_text.charCodeAt(i0+1) == 101/*e*/ && _text.charCodeAt(i0+2) == 116/*t*/ && _text.charCodeAt(i0+3) == 117/*u*/ && _text.charCodeAt(i0+4) == 114/*r*/ && _text.charCodeAt(i0+5) == 110/*n*/) return TokenKind.RETURN;
|
| - } else if (ch == 115/*s*/) {
|
| - ch = _text.charCodeAt(i0+1);
|
| - if (ch == 111/*o*/) {
|
| - if (_text.charCodeAt(i0+2) == 117/*u*/ && _text.charCodeAt(i0+3) == 114/*r*/ && _text.charCodeAt(i0+4) == 99/*c*/ && _text.charCodeAt(i0+5) == 101/*e*/) return TokenKind.SOURCE;
|
| - } else if (ch == 116/*t*/) {
|
| - if (_text.charCodeAt(i0+2) == 97/*a*/ && _text.charCodeAt(i0+3) == 116/*t*/ && _text.charCodeAt(i0+4) == 105/*i*/ && _text.charCodeAt(i0+5) == 99/*c*/) return TokenKind.STATIC;
|
| - } else if (ch == 119/*w*/) {
|
| - if (_text.charCodeAt(i0+2) == 105/*i*/ && _text.charCodeAt(i0+3) == 116/*t*/ && _text.charCodeAt(i0+4) == 99/*c*/ && _text.charCodeAt(i0+5) == 104/*h*/) return TokenKind.SWITCH;
|
| - }
|
| - }
|
| - return TokenKind.IDENTIFIER;
|
| - case 7:
|
| - ch = _text.charCodeAt(i0);
|
| - if (ch == 100/*d*/) {
|
| - if (_text.charCodeAt(i0+1) == 101/*e*/ && _text.charCodeAt(i0+2) == 102/*f*/ && _text.charCodeAt(i0+3) == 97/*a*/ && _text.charCodeAt(i0+4) == 117/*u*/ && _text.charCodeAt(i0+5) == 108/*l*/ && _text.charCodeAt(i0+6) == 116/*t*/) return TokenKind.DEFAULT;
|
| - } else if (ch == 101/*e*/) {
|
| - if (_text.charCodeAt(i0+1) == 120/*x*/ && _text.charCodeAt(i0+2) == 116/*t*/ && _text.charCodeAt(i0+3) == 101/*e*/ && _text.charCodeAt(i0+4) == 110/*n*/ && _text.charCodeAt(i0+5) == 100/*d*/ && _text.charCodeAt(i0+6) == 115/*s*/) return TokenKind.EXTENDS;
|
| - } else if (ch == 102/*f*/) {
|
| - ch = _text.charCodeAt(i0+1);
|
| - if (ch == 97/*a*/) {
|
| - if (_text.charCodeAt(i0+2) == 99/*c*/ && _text.charCodeAt(i0+3) == 116/*t*/ && _text.charCodeAt(i0+4) == 111/*o*/ && _text.charCodeAt(i0+5) == 114/*r*/ && _text.charCodeAt(i0+6) == 121/*y*/) return TokenKind.FACTORY;
|
| - } else if (ch == 105/*i*/) {
|
| - if (_text.charCodeAt(i0+2) == 110/*n*/ && _text.charCodeAt(i0+3) == 97/*a*/ && _text.charCodeAt(i0+4) == 108/*l*/ && _text.charCodeAt(i0+5) == 108/*l*/ && _text.charCodeAt(i0+6) == 121/*y*/) return TokenKind.FINALLY;
|
| - }
|
| - } else if (ch == 108/*l*/) {
|
| - if (_text.charCodeAt(i0+1) == 105/*i*/ && _text.charCodeAt(i0+2) == 98/*b*/ && _text.charCodeAt(i0+3) == 114/*r*/ && _text.charCodeAt(i0+4) == 97/*a*/ && _text.charCodeAt(i0+5) == 114/*r*/ && _text.charCodeAt(i0+6) == 121/*y*/) return TokenKind.LIBRARY;
|
| - } else if (ch == 116/*t*/) {
|
| - if (_text.charCodeAt(i0+1) == 121/*y*/ && _text.charCodeAt(i0+2) == 112/*p*/ && _text.charCodeAt(i0+3) == 101/*e*/ && _text.charCodeAt(i0+4) == 100/*d*/ && _text.charCodeAt(i0+5) == 101/*e*/ && _text.charCodeAt(i0+6) == 102/*f*/) return TokenKind.TYPEDEF;
|
| - }
|
| - return TokenKind.IDENTIFIER;
|
| - case 8:
|
| - ch = _text.charCodeAt(i0);
|
| - if (ch == 97/*a*/) {
|
| - if (_text.charCodeAt(i0+1) == 98/*b*/ && _text.charCodeAt(i0+2) == 115/*s*/ && _text.charCodeAt(i0+3) == 116/*t*/ && _text.charCodeAt(i0+4) == 114/*r*/ && _text.charCodeAt(i0+5) == 97/*a*/ && _text.charCodeAt(i0+6) == 99/*c*/ && _text.charCodeAt(i0+7) == 116/*t*/) return TokenKind.ABSTRACT;
|
| - } else if (ch == 99/*c*/) {
|
| - if (_text.charCodeAt(i0+1) == 111/*o*/ && _text.charCodeAt(i0+2) == 110/*n*/ && _text.charCodeAt(i0+3) == 116/*t*/ && _text.charCodeAt(i0+4) == 105/*i*/ && _text.charCodeAt(i0+5) == 110/*n*/ && _text.charCodeAt(i0+6) == 117/*u*/ && _text.charCodeAt(i0+7) == 101/*e*/) return TokenKind.CONTINUE;
|
| - } else if (ch == 111/*o*/) {
|
| - if (_text.charCodeAt(i0+1) == 112/*p*/ && _text.charCodeAt(i0+2) == 101/*e*/ && _text.charCodeAt(i0+3) == 114/*r*/ && _text.charCodeAt(i0+4) == 97/*a*/ && _text.charCodeAt(i0+5) == 116/*t*/ && _text.charCodeAt(i0+6) == 111/*o*/ && _text.charCodeAt(i0+7) == 114/*r*/) return TokenKind.OPERATOR;
|
| - }
|
| - return TokenKind.IDENTIFIER;
|
| - case 9:
|
| - if (_text.charCodeAt(i0) == 105/*i*/ && _text.charCodeAt(i0+1) == 110/*n*/ && _text.charCodeAt(i0+2) == 116/*t*/ && _text.charCodeAt(i0+3) == 101/*e*/ && _text.charCodeAt(i0+4) == 114/*r*/ && _text.charCodeAt(i0+5) == 102/*f*/ && _text.charCodeAt(i0+6) == 97/*a*/ && _text.charCodeAt(i0+7) == 99/*c*/ && _text.charCodeAt(i0+8) == 101/*e*/) return TokenKind.INTERFACE;
|
| - return TokenKind.IDENTIFIER;
|
| - case 10:
|
| - if (_text.charCodeAt(i0) == 105/*i*/ && _text.charCodeAt(i0+1) == 109/*m*/ && _text.charCodeAt(i0+2) == 112/*p*/ && _text.charCodeAt(i0+3) == 108/*l*/ && _text.charCodeAt(i0+4) == 101/*e*/ && _text.charCodeAt(i0+5) == 109/*m*/ && _text.charCodeAt(i0+6) == 101/*e*/ && _text.charCodeAt(i0+7) == 110/*n*/ && _text.charCodeAt(i0+8) == 116/*t*/ && _text.charCodeAt(i0+9) == 115/*s*/) return TokenKind.IMPLEMENTS;
|
| - return TokenKind.IDENTIFIER;
|
| - default: return TokenKind.IDENTIFIER;
|
| - }
|
| - }
|
| -
|
| -}
|
| -
|
| -/** Static helper methods. */
|
| -class TokenizerHelpers {
|
| -
|
| - static bool isIdentifierStart(int c) {
|
| - return ((c >= 97/*a*/ && c <= 122/*z*/) || (c >= 65/*A*/ && c <= 90/*Z*/) || c == 95/*_*/);
|
| - }
|
| -
|
| - static bool isDigit(int c) {
|
| - return (c >= 48/*0*/ && c <= 57/*9*/);
|
| - }
|
| -
|
| - static bool isHexDigit(int c) {
|
| - return (isDigit(c) || (c >= 97/*a*/ && c <= 102/*f*/) || (c >= 65/*A*/ && c <= 70/*F*/));
|
| - }
|
| -
|
| - static bool isWhitespace(int c) {
|
| - return (c == 32/*' '*/ || c == 9/*'\t'*/ || c == 10/*'\n'*/ || c == 13/*'\r'*/);
|
| - }
|
| -
|
| - static bool isIdentifierPart(int c) {
|
| - return (isIdentifierStart(c) || isDigit(c) || c == 36/*$*/);
|
| - }
|
| -
|
| - static bool isInterpIdentifierPart(int c) {
|
| - return (isIdentifierStart(c) || isDigit(c));
|
| - }
|
| -
|
| -
|
| -}
|
|
|