Skip to content
Permalink
Browse files
BSL: Made directive greedy (#3112)
  • Loading branch information
RunDevelopment committed Oct 5, 2021
1 parent d7017be commit 5c412cbb2765fe494c45981c6c95658a68a6a6a7
@@ -44,15 +44,15 @@ Prism.languages.bsl = {
{
pattern: /\b(?:and|not|or)\b/i
}

],
'punctuation': /\(\.|\.\)|[()\[\]:;,.]/,
'directive': [
// Теги препроцессора вида &Клиент, &Сервер, ...
// Preprocessor tags of the type &Client, &Server, ...
{
pattern: /^(\s*)&.*/m,
pattern: /^([ \t]*)&.*/m,
lookbehind: true,
greedy: true,
alias: 'important'
},
// Инструкции препроцессора вида:
@@ -64,7 +64,9 @@ Prism.languages.bsl = {
// ...
// #EndIf
{
pattern: /^\s*#.*/gm,
pattern: /^([ \t]*)#.*/gm,
lookbehind: true,
greedy: true,
alias: 'important'
}
]

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

@@ -0,0 +1,13 @@
&Client

#If Server Then
#EndIf

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

[
["directive", "&Client"],

["directive", "#If Server Then"],
["directive", "#EndIf"]
]
@@ -0,0 +1,18 @@
(. .)
( ) [ ] : ; , .

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

[
["punctuation", "(."],
["punctuation", ".)"],

["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ":"],
["punctuation", ";"],
["punctuation", ","],
["punctuation", "."]
]
@@ -1,13 +1,19 @@
""
"fo"

''
'foo'

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

[
["string", "\"\""],
["string", "\"fo\""]
["string", "\"fo\""],

["string", "''"],
["string", "'foo'"]
]

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

Checks for strings and chars.
Checks for strings and chars.

0 comments on commit 5c412cb

Please sign in to comment.