protected Token fetchId ( ) { Token result = Token . create ( Token . TokenType . ID , input . current ( ) ) ; result . addToContent ( input . consume ( ) ) ; while ( isIdentifierChar ( input . current ( ) ) ) { result . addToContent ( input . consume ( ) ) ; } if ( ! input . current ( ) . isEndOfInput ( ) && specialIdTerminators . contains ( input . current ( ) . getValue ( ) ) ) { Token specialId = Token . create ( Token . TokenType . SPECIAL_ID , result ) ; specialId . setTrigger ( input . current ( ) . getStringValue ( ) ) ; specialId . setContent ( result . getContents ( ) ) ; specialId . setSource ( result . getContents ( ) ) ; specialId . addToSource ( input . current ( ) ) ; input . consume ( ) ; return handleKeywords ( specialId ) ; } return handleKeywords ( result ) ; }
Reads and returns an identifier