newToken
Factory used by ExpTokenManager to create tokens. Every kind currently maps to a plain Token; a kind-specific subclass can be returned by adding a case to the switch.
Return
a new token of the given kind and image
Parameters
ofKind
the token kind, as declared in ExpConstants
image
the source text matched by the token
Factory for tokens without an image.
Return
a new token of the given kind with no image
Parameters
ofKind
the token kind, as declared in ExpConstants