traceur
Version:
ES6 to ES5 compiler
126 lines (124 loc) • 4.2 kB
JavaScript
// Copyright 2012 Traceur Authors.
//
// Licensed under the Apache License, Version 2.0 (the 'License');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an 'AS IS' BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 7.5 Tokens
export const AMPERSAND = '&';
export const AMPERSAND_EQUAL = '&=';
export const AND = '&&';
export const ARROW = '=>';
export const AT = '@';
export const BACK_QUOTE = '`';
export const BANG = '!';
export const BAR = '|';
export const BAR_EQUAL = '|=';
export const BREAK = 'break';
export const CARET = '^';
export const CARET_EQUAL = '^=';
export const CASE = 'case';
export const CATCH = 'catch';
export const CLASS = 'class';
export const CLOSE_ANGLE = '>';
export const CLOSE_CURLY = '}';
export const CLOSE_PAREN = ')';
export const CLOSE_SQUARE = ']';
export const COLON = ':';
export const COMMA = ',';
export const CONST = 'const';
export const CONTINUE = 'continue';
export const DEBUGGER = 'debugger';
export const DEFAULT = 'default';
export const DELETE = 'delete';
export const DO = 'do';
export const DOT_DOT_DOT = '...';
export const ELSE = 'else';
export const END_OF_FILE = 'End of File';
export const ENUM = 'enum';
export const EQUAL = '=';
export const EQUAL_EQUAL = '==';
export const EQUAL_EQUAL_EQUAL = '===';
export const ERROR = 'error';
export const EXPORT = 'export';
export const EXTENDS = 'extends';
export const FALSE = 'false';
export const FINALLY = 'finally';
export const FOR = 'for';
export const FUNCTION = 'function';
export const GREATER_EQUAL = '>=';
export const IDENTIFIER = 'identifier';
export const IF = 'if';
export const IMPLEMENTS = 'implements';
export const IMPORT = 'import';
export const IN = 'in';
export const INSTANCEOF = 'instanceof';
export const INTERFACE = 'interface';
export const JSX_IDENTIFIER = 'jsx identifier';
export const LEFT_SHIFT = '<<';
export const LEFT_SHIFT_EQUAL = '<<=';
export const LESS_EQUAL = '<=';
export const LET = 'let';
export const MINUS = '-';
export const MINUS_EQUAL = '-=';
export const MINUS_MINUS = '--';
export const NEW = 'new';
export const NO_SUBSTITUTION_TEMPLATE = 'no substitution template';
export const NOT_EQUAL = '!=';
export const NOT_EQUAL_EQUAL = '!==';
export const NULL = 'null';
export const NUMBER = 'number literal';
export const OPEN_ANGLE = '<';
export const OPEN_CURLY = '{';
export const OPEN_PAREN = '(';
export const OPEN_SQUARE = '[';
export const OR = '||';
export const PACKAGE = 'package';
export const PERCENT = '%';
export const PERCENT_EQUAL = '%=';
export const PERIOD = '.';
export const PLUS = '+';
export const PLUS_EQUAL = '+=';
export const PLUS_PLUS = '++';
export const PRIVATE = 'private';
export const PROTECTED = 'protected';
export const PUBLIC = 'public';
export const QUESTION = '?';
export const REGULAR_EXPRESSION = 'regular expression literal';
export const RETURN = 'return';
export const RIGHT_SHIFT = '>>';
export const RIGHT_SHIFT_EQUAL = '>>=';
export const SEMI_COLON = ';';
export const SLASH = '/';
export const SLASH_EQUAL = '/=';
export const STAR = '*';
export const STAR_EQUAL = '*=';
export const STAR_STAR = '**';
export const STAR_STAR_EQUAL = '**=';
export const STATIC = 'static';
export const STRING = 'string literal';
export const SUPER = 'super';
export const SWITCH = 'switch';
export const TEMPLATE_HEAD = 'template head';
export const TEMPLATE_MIDDLE = 'template middle';
export const TEMPLATE_TAIL = 'template tail';
export const THIS = 'this';
export const THROW = 'throw';
export const TILDE = '~';
export const TRUE = 'true';
export const TRY = 'try';
export const TYPEOF = 'typeof';
export const UNSIGNED_RIGHT_SHIFT = '>>>';
export const UNSIGNED_RIGHT_SHIFT_EQUAL = '>>>=';
export const VAR = 'var';
export const VOID = 'void';
export const WHILE = 'while';
export const WITH = 'with';
export const YIELD = 'yield';