public final class PowerQueryTokenCodes extends Object
Isolated from TBaseType to avoid
reshuffling existing vendor token values when Power Query support is
added. Codes here start at 2000 (well above all existing base codes
and well below any vendor-reserved range).
The sentinel PQ_TOKEN_BASE = 2000 gives 96 slots for
M-specific tokens which is generous even for a full Tier 3 grammar.
| Modifier and Type | Field and Description |
|---|---|
static int |
DOUBLE_DOT |
static int |
ELLIPSIS |
static int |
FAT_ARROW |
static int |
PQ_TOKEN_BASE |
static int |
QIDENT |
static int |
RW_AND |
static int |
RW_AS |
static int |
RW_EACH |
static int |
RW_ELSE |
static int |
RW_ERROR |
static int |
RW_FALSE |
static int |
RW_IF |
static int |
RW_IN |
static int |
RW_IS |
static int |
RW_LET |
static int |
RW_META |
static int |
RW_NOT |
static int |
RW_NULL |
static int |
RW_OR |
static int |
RW_OTHERWISE |
static int |
RW_SECTION |
static int |
RW_SHARED |
static int |
RW_THEN |
static int |
RW_TRUE |
static int |
RW_TRY |
static int |
RW_TYPE |
| Modifier and Type | Method and Description |
|---|---|
static int |
keywordCode(String upperText)
Map an uppercase identifier text to its keyword token code, or
-1 if the text is not a reserved M keyword. |
static String |
keywordText(int tokencode)
Reverse lookup: given a token code, return its M-language keyword
text (uppercase) or
null. |
public static final int PQ_TOKEN_BASE
public static final int RW_LET
public static final int RW_IN
public static final int RW_EACH
public static final int RW_IF
public static final int RW_THEN
public static final int RW_ELSE
public static final int RW_TRUE
public static final int RW_FALSE
public static final int RW_NULL
public static final int RW_AND
public static final int RW_OR
public static final int RW_NOT
public static final int RW_TRY
public static final int RW_OTHERWISE
public static final int RW_ERROR
public static final int RW_IS
public static final int RW_AS
public static final int RW_TYPE
public static final int RW_META
public static final int RW_SECTION
public static final int RW_SHARED
public static final int FAT_ARROW
public static final int DOUBLE_DOT
public static final int ELLIPSIS
public static final int QIDENT
public static String keywordText(int tokencode)
null. Useful for diagnostics.public static int keywordCode(String upperText)
-1 if the text is not a reserved M keyword.