Improve IFQL syntax highlighting
parent
7981ad53ee
commit
85e9eac4ac
|
@ -10,13 +10,21 @@ export const modeIFQL = {
|
||||||
regex: /\w+(?=[(])/,
|
regex: /\w+(?=[(])/,
|
||||||
token: 'function',
|
token: 'function',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
regex: /[\w\d]+(?=\s[=]\s)/,
|
||||||
|
token: 'variable',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
regex: /[=][>]/,
|
regex: /[=][>]/,
|
||||||
token: 'arrow-function',
|
token: 'arrow-function',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
regex: /\w+(?=[)]\s[=][>])(?![(])/,
|
||||||
|
token: 'function-arg',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
regex: /AND|OR|[=][=]|[!][=]|[<][=]|[>][=]/,
|
regex: /AND|OR|[=][=]|[!][=]|[<][=]|[>][=]/,
|
||||||
token: 'logic-operator',
|
token: 'operator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
regex: /\w+[:]/,
|
regex: /\w+[:]/,
|
||||||
|
@ -25,11 +33,11 @@ export const modeIFQL = {
|
||||||
// The regex matches the token, the token property contains the type
|
// The regex matches the token, the token property contains the type
|
||||||
{
|
{
|
||||||
regex: /"(?:[^\\]|\\.)*?(?:"|$)/,
|
regex: /"(?:[^\\]|\\.)*?(?:"|$)/,
|
||||||
token: 'string.double',
|
token: 'string-double',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
regex: /'(?:[^\\]|\\.)*?(?:'|$)/,
|
regex: /'(?:[^\\]|\\.)*?(?:'|$)/,
|
||||||
token: 'string.single',
|
token: 'string-single',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
regex: /(function)(\s+)([a-z$][\w$]*)/,
|
regex: /(function)(\s+)([a-z$][\w$]*)/,
|
||||||
|
|
Loading…
Reference in New Issue