// 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. // ignore_for_file: constant_identifier_names part of '../parser.dart'; // 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; // EOF 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 CARET = 30; // ^ static const int DOLLAR = 31; // $ static const int LESS = 32; // < static const int BANG = 33; // ! static const int MINUS = 34; // - static const int BACKSLASH = 35; // \ static const int AMPERSAND = 36; // & // WARNING: Tokens from this point and above must have the corresponding ASCII // character in the TokenChar list at the bottom of this file. The // order of the above tokens should be the same order as TokenChar. /// [TokenKind] representing integer tokens. static const int INTEGER = 60; /// [TokenKind] representing hex integer tokens. static const int HEX_INTEGER = 61; /// [TokenKind] representing double tokens. static const int DOUBLE = 62; /// [TokenKind] representing whitespace tokens. static const int WHITESPACE = 63; /// [TokenKind] representing comment tokens. static const int COMMENT = 64; /// [TokenKind] representing error tokens. static const int ERROR = 65; /// [TokenKind] representing incomplete string tokens. static const int INCOMPLETE_STRING = 66; /// [TokenKind] representing incomplete comment tokens. static const int INCOMPLETE_COMMENT = 67; static const int VAR_DEFINITION = 400; // var-NNN-NNN static const int VAR_USAGE = 401; // var(NNN-NNN [,default]) // Synthesized Tokens (no character associated with TOKEN). 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; //