public static Token createAndFill ( TokenType type , Char ch ) { Token result = new Token ( ) ; result . type = type ; result . line = ch . getLine ( ) ; result . pos = ch . getPos ( ) ; result . contents = ch . getStringValue ( ) ; result . trigger = ch . getStringValue ( ) ; result . source = ch . toString ( ) ; return result ; }
Creates a new token with the given type using the Char a initial trigger and content .