1// NB: Because Token has static members of type CommonToken, the Token dummy
2// constructor is defined in CommonToken.  All methods and vars of Token are
3// defined here.  Token is an interface, not a subclass in the Java runtime.
4
5/**
6 * @class Abstract base class of all token types.
7 * @name Token
8 * @memberOf org.antlr.runtime
9 */
10org.antlr.runtime.Token = function() {};
11org.antlr.lang.augmentObject(org.antlr.runtime.Token, /** @lends Token */ {
12    EOR_TOKEN_TYPE: 1,
13
14    /** imaginary tree navigation type; traverse "get child" link */
15    DOWN: 2,
16    /** imaginary tree navigation type; finish with a child list */
17    UP: 3,
18
19    MIN_TOKEN_TYPE: 4, // UP+1,
20
21    EOF: org.antlr.runtime.CharStream.EOF,
22    EOF_TOKEN: null,
23
24    INVALID_TOKEN_TYPE: 0,
25    INVALID_TOKEN: null,
26
27    /** In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR
28     *  will avoid creating a token for this symbol and try to fetch another.
29     */
30    SKIP_TOKEN: null,
31
32    /** All tokens go to the parser (unless skip() is called in that rule)
33     *  on a particular "channel".  The parser tunes to a particular channel
34     *  so that whitespace etc... can go to the parser on a "hidden" channel.
35     */
36    DEFAULT_CHANNEL: 0,
37
38    /** Anything on different channel than DEFAULT_CHANNEL is not parsed
39     *  by parser.
40     */
41    HIDDEN_CHANNEL: 99
42});
43