public static Token create ( TokenType type , Position pos ) { Token result = new Token ( ) ; result . type = type ; result . line = pos . getLine ( ) ; result . pos = pos . getPos ( ) ; return result ; }
Creates a new token with the given type using the given position as location info .