Skip to content
Permalink
Browse files
AQL: Differenciate between strings and identifiers (#3183)
  • Loading branch information
RunDevelopment committed Nov 22, 2021
1 parent 9f5e511 commit fa540ab72c5c8b33605a102b26e9110b0406e2b7
Showing with 17 additions and 8 deletions.
  1. +5 −1 components/prism-aql.js
  2. +1 −1 components/prism-aql.min.js
  3. +9 −0 tests/languages/aql/identifier_feature.test
  4. +2 −6 tests/languages/aql/string_feature.test
@@ -6,7 +6,11 @@ Prism.languages.aql = {
greedy: true
},
'string': {
pattern: /(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
greedy: true
},
'identifier': {
pattern: /([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
greedy: true
},
'variable': /@@?\w+/,

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,9 @@
´filter´
`sort`

----------------------------------------------------

[
["identifier", "´filter´"],
["identifier", "`sort`"]
]
@@ -10,9 +10,6 @@
'this is a longer string.'
'the path separator on Windows is \\'

´filter´
`sort`

----------------------------------------------------

[
@@ -21,13 +18,12 @@
["string", "\"this is a \\\"quoted\\\" word\""],
["string", "\"this is a longer string.\""],
["string", "\"the path separator on Windows is \\\\\""],

["string", "'yikes!'"],
["string", "'don\\'t know'"],
["string", "'this is a \"quoted\" word'"],
["string", "'this is a longer string.'"],
["string", "'the path separator on Windows is \\\\'"],
["string", "´filter´"],
["string", "`sort`"]
["string", "'the path separator on Windows is \\\\'"]
]

----------------------------------------------------

0 comments on commit fa540ab

Please sign in to comment.