A factory of tokens with a given text.

Three implementations are provided in this module:

no type hierarchy

no supertypes hierarchy

Inherited Attributes
Attributes inherited from: Object
hash, string
tokenSource Codeshared formal CommonToken token(String text, Integer type, Integer length = ...)

Creates a CommonToken with the specified text, type, and length.

  • text

    The text of the token.

  • type

    The type of the token.

    Use the constants from CeylonLexer.

  • length = ength = t

    The length of the token.

    Defaults to text.length, and this is what you want in almost all cases; the only exception are identifier tokens like \iCONSTANT where the text is just "CONSTANT", but the length is still 10.

Inherited Methods
Methods inherited from: Object