// Copyright (c) 2011, 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. // TODO(terry): Need to be consistent with tokens either they're ASCII tokens // e.g., ASTERISK or they're CSS e.g., PSEUDO, COMBINATOR_*. class TokenKind { // Common shared tokens used in TokenizerBase. static const int UNUSED = 0; // Unused place holder... static const int END_OF_FILE = 1; // TODO(terry): Must match base static const int LPAREN = 2; // ( static const int RPAREN = 3; // ) static const int LBRACK = 4; // [ static const int RBRACK = 5; // ] static const int LBRACE = 6; // { static const int RBRACE = 7; // } static const int DOT = 8; // . static const int SEMICOLON = 9; // ; // Unique tokens for CSS. static const int AT = 10; // @ static const int HASH = 11; // # static const int PLUS = 12; // + static const int GREATER = 13; // > static const int TILDE = 14; // ~ static const int ASTERISK = 15; // * static const int NAMESPACE = 16; // | static const int COLON = 17; // : static const int PRIVATE_NAME = 18; // _ prefix private class or id static const int COMMA = 19; // , static const int SPACE = 20; static const int TAB = 21; // /t static const int NEWLINE = 22; // /n static const int RETURN = 23; // /r static const int PERCENT = 24; // % static const int SINGLE_QUOTE = 25; // ' static const int DOUBLE_QUOTE = 26; // " static const int SLASH = 27; // / static const int EQUALS = 28; // = static const int OR = 29; // | static const int CARET = 30; // ^ static const int DOLLAR = 31; // $ static const int LESS = 32; // < static const int BANG = 33; // ! static const int MINUS = 34; // - // WARNING: END_TOKENS must be 1 greater than the last token above (last // character in our list). Also add to kindToString function and the // constructor for TokenKind. static const int END_TOKENS = 35; // Marker for last token in list /** [TokenKind] representing integer tokens. */ static const int INTEGER = 60; // TODO(terry): must match base /** [TokenKind] representing hex integer tokens. */ // static const int HEX_INTEGER = 61; // TODO(terry): must match base /** [TokenKind] representing double tokens. */ static const int DOUBLE = 62; // TODO(terry): must match base /** [TokenKind] representing whitespace tokens. */ static const int WHITESPACE = 63; // TODO(terry): must match base /** [TokenKind] representing comment tokens. */ static const int COMMENT = 64; // TODO(terry): must match base /** [TokenKind] representing error tokens. */ static const int ERROR = 65; // TODO(terry): must match base /** [TokenKind] representing incomplete string tokens. */ static const int INCOMPLETE_STRING = 66; // TODO(terry): must match base /** [TokenKind] representing incomplete comment tokens. */ static const int INCOMPLETE_COMMENT = 67; // TODO(terry): must match base // Synthesized Tokens (no character associated with TOKEN). // TODO(terry): Possible common names used by both Dart and CSS tokenizers. static const int STRING = 500; static const int STRING_PART = 501; static const int NUMBER = 502; static const int HEX_NUMBER = 503; static const int HTML_COMMENT = 504; //