2024-08-02 20:03:49 +00:00
|
|
|
<lexer>
|
|
|
|
<config>
|
|
|
|
<name>PowerQuery</name>
|
|
|
|
<alias>powerquery</alias>
|
|
|
|
<alias>pq</alias>
|
|
|
|
<filename>*.pq</filename>
|
|
|
|
<mime_type>text/x-powerquery</mime_type>
|
|
|
|
<case_insensitive>true</case_insensitive>
|
|
|
|
<dot_all>true</dot_all>
|
|
|
|
</config>
|
|
|
|
<rules>
|
|
|
|
<state name="root">
|
|
|
|
<rule pattern="\s+">
|
|
|
|
<token type="Text"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="//.*?\n">
|
|
|
|
<token type="CommentSingle"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="/\*.*?\*/">
|
|
|
|
<token type="CommentMultiline"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern=""(\\\\|\\"|[^"])*"">
|
|
|
|
<token type="LiteralString"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="(and|as|each|else|error|false|if|in|is|let|meta|not|null|or|otherwise|section|shared|then|true|try|type)\b">
|
|
|
|
<token type="Keyword"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="(#binary|#date|#datetime|#datetimezone|#duration|#infinity|#nan|#sections|#shared|#table|#time)\b">
|
|
|
|
<token type="KeywordType"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="(([a-zA-Z]|_)[\w|._]*|#"[^"]+")">
|
|
|
|
<token type="Name"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?">
|
|
|
|
<token type="LiteralNumberHex"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="([0-9]+\.[0-9]+|\.[0-9]+)([eE][0-9]+)?">
|
|
|
|
<token type="LiteralNumberFloat"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="[0-9]+">
|
|
|
|
<token type="LiteralNumberInteger"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="[\(\)\[\]\{\}]">
|
|
|
|
<token type="Punctuation"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="\.\.|\.\.\.|=>|<=|>=|<>|[@!?,;=<>\+\-\*\/&]">
|
|
|
|
<token type="Operator"/>
|
|
|
|
</rule>
|
|
|
|
</state>
|
|
|
|
</rules>
|
2024-08-26 23:18:28 +00:00
|
|
|
</lexer>
|