public class PowerQueryTokenizer extends Object
Reads raw M text and produces a TSourceTokenList compatible
with the rest of the GSP machinery. Emits:
IDENT (TBaseType.ident) — simple identifiersQIDENT (PowerQueryTokenCodes.QIDENT) — #"..."SCONST (TBaseType.sconst) — string literals, raw form preserved in token textICONST / FCONST — integer / decimal numbersPowerQueryTokenCodes.RW_LET …)FAT_ARROW (=>), DOUBLE_DOT (..),
ELLIPSIS (...)_COMMENT (//) and block-comment tokens — treated as
whitespace by downstream, but preserved so the token list can be
inspected for bug reportsThe tokenizer is deliberately simple and forgiving: unknown characters become single-character tokens rather than errors. The document parser decides what to do with them.
| Constructor and Description |
|---|
PowerQueryTokenizer(String text) |
| Modifier and Type | Method and Description |
|---|---|
static PowerQueryTokenizer |
from(BufferedReader reader)
Convenience constructor that slurps a
BufferedReader. |
void |
tokenizeInto(TSourceTokenList out)
Tokenize
text and append every produced token to out. |
public PowerQueryTokenizer(String text)
public static PowerQueryTokenizer from(BufferedReader reader) throws IOException
BufferedReader.IOExceptionpublic void tokenizeInto(TSourceTokenList out)
text and append every produced token to out.