public class PowerQueryDocumentParser extends Object
PowerQueryTokenizer) and builds the step graph
rooted at TPowerQueryLetExpr.
This is intentionally a lightweight parser, not a full M-language parser. It answers exactly the 6 questions the plan calls out:
let bindings?in?Value.NativeQuery? → extract SQL,
decode escapesAnything else (each, closures, type ascription, metadata, etc.) is
swallowed by skipExpression() which advances past a balanced
token sequence. A warning is emitted when an expression cannot be
classified into one of the lineage-bearing shapes.
| Constructor and Description |
|---|
PowerQueryDocumentParser(List<TSourceToken> tokens) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getWarnings() |
TPowerQueryLetExpr |
parse()
Parse the token list as a complete M document.
|
public PowerQueryDocumentParser(List<TSourceToken> tokens)
public List<String> getWarnings()
public TPowerQueryLetExpr parse()
TPowerQueryLetExpr or null if the document
is not a let ... in ... shape and nothing can be extracted.