Community
Participate
Working Groups
there's now way to get Scanner.TokenNameWHITESPACE Scanner.TokenNameCOMMENT_LINE Scanner.TokenNameCOMMENT_BLOCK Scanner.TokenNameCOMMENT_JAVADOC
i meant 'there's no way'
Which way are you creating the scanner? If you want comments and whitespaces, you have to use: ToolFactory.createScanner(true, true, false); // false if you don't want to be in assert mode Let me know if this is the way you created your scanner.
yes, i use ToolFactory (well, for now i use new Scanner(...)) but wanted to move to using the API but these token IDs are missing
If you properly toggle the scanner factory method, then it will tokenize these tokens, see Olivier's comment. Please reopen if you can provide a test case where it doesn't work. Closing
i do get them tokenized but how do i know (using API types) that i have one of these tokens in hand? the only way is to use constants defined in Scanner but Scanner is not API
Constants surfaced on ITerminalSymbols. Fixed.