mirror of
https://github.com/Reuh/sublime-anselme.git
synced 2025-10-27 11:49:30 +00:00
Update to latest Anselme version
This commit is contained in:
parent
13408c49d9
commit
b313536643
1 changed files with 37 additions and 15 deletions
|
|
@ -14,28 +14,40 @@ variables:
|
||||||
[^0-9\s\'{{identifier_disallowed}}][^{{identifier_disallowed}}]*
|
[^0-9\s\'{{identifier_disallowed}}][^{{identifier_disallowed}}]*
|
||||||
|\_( \! | \- | \* | \~ )
|
|\_( \! | \- | \* | \~ )
|
||||||
|( \! )\_
|
|( \! )\_
|
||||||
|\_( \|\> | \+ | \- | \/ | \/\/ | \* | \^ | \% | \& | \| | \=\= | \= | \!\= | \>\= | \<\= | \< | \> | \. | \:\: | \# | \: )\_
|
|\_( \+ | \- | \/ | \/\/ | \* | \^ | \% | \& | \| | \=\= | \= | \!\= | \>\= | \<\= | \< | \> | \. | \:\: | \# | \: )\_
|
||||||
)
|
)
|
||||||
|
|
||||||
contexts:
|
contexts:
|
||||||
prototype:
|
prototype:
|
||||||
- match: '\/\*'
|
- include: comments_and_whitespace
|
||||||
scope: comment.line.anselme punctuation.definition.comment.anselme
|
|
||||||
push: comment
|
|
||||||
- match: '\s+'
|
|
||||||
- match: '$'
|
- match: '$'
|
||||||
pop: true
|
pop: true
|
||||||
|
|
||||||
|
comments_and_whitespace:
|
||||||
|
- match: '\/\/'
|
||||||
|
scope: comment.line.anselme punctuation.definition.comment.anselme
|
||||||
|
push: comment
|
||||||
|
- match: '\/\*'
|
||||||
|
scope: comment.block.anselme punctuation.definition.comment.anselme
|
||||||
|
push: multiline_comment
|
||||||
|
- match: '\s+'
|
||||||
|
|
||||||
main:
|
main:
|
||||||
- match: ''
|
- match: ''
|
||||||
push: primary
|
push: primary
|
||||||
|
|
||||||
comment:
|
comment:
|
||||||
- meta_scope: comment.line.anselme
|
- meta_scope: comment.line.anselme
|
||||||
|
- match: '\/\/|$'
|
||||||
|
scope: punctuation.definition.comment.anselme
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
multiline_comment:
|
||||||
|
- meta_scope: comment.block.anselme
|
||||||
- match: '\/\*'
|
- match: '\/\*'
|
||||||
scope: punctuation.definition.comment.anselme
|
scope: punctuation.definition.comment.anselme
|
||||||
push: comment
|
push: multiline_comment
|
||||||
- match: '\*\/|$'
|
- match: '\*\/'
|
||||||
scope: punctuation.definition.comment.anselme
|
scope: punctuation.definition.comment.anselme
|
||||||
pop: true
|
pop: true
|
||||||
|
|
||||||
|
|
@ -54,7 +66,7 @@ contexts:
|
||||||
- match: '\('
|
- match: '\('
|
||||||
scope: punctuation.section.parens.begin.anselme
|
scope: punctuation.section.parens.begin.anselme
|
||||||
push: parenthesis
|
push: parenthesis
|
||||||
- match: '\::?&?@?\$'
|
- match: '\:&?@?\$'
|
||||||
scope: keyword.declaration.anselme
|
scope: keyword.declaration.anselme
|
||||||
push: function_definition
|
push: function_definition
|
||||||
- match: '(\#)({{identifier}})'
|
- match: '(\#)({{identifier}})'
|
||||||
|
|
@ -62,17 +74,23 @@ contexts:
|
||||||
1: keyword.declaration.anselme
|
1: keyword.declaration.anselme
|
||||||
2: entity.name.label.anselme
|
2: entity.name.label.anselme
|
||||||
push: secondary
|
push: secondary
|
||||||
- match: '(\::?&?@?)({{identifier}})'
|
- match: '(\:&?@?)({{identifier}})'
|
||||||
captures:
|
captures:
|
||||||
1: keyword.declaration.anselme
|
1: keyword.declaration.anselme
|
||||||
2: variable.other.anselme
|
2: variable.other.anselme
|
||||||
push: secondary
|
push: secondary
|
||||||
- match: '{{identifier}}(?=\!(?!\s*{{identifier}})|\()'
|
- match: '{{identifier}}(?=\!(?!\s*{{identifier}})|\(|\[|\{)'
|
||||||
scope: variable.function.anselme
|
scope: variable.function.anselme
|
||||||
set: secondary
|
set: secondary
|
||||||
|
- match: '({{identifier}})\s*(?=\:)'
|
||||||
|
scope: meta.mapping.key.anselme string.unquoted.key.anselme
|
||||||
|
push: secondary
|
||||||
- match: '{{identifier}}'
|
- match: '{{identifier}}'
|
||||||
scope: variable.other.anselme
|
scope: variable.other.anselme
|
||||||
push: secondary
|
push: secondary
|
||||||
|
- match: '\-\-\-'
|
||||||
|
scope: text.anselme meta.separator.thematic-break.anselme punctuation.definition.thematic-break.anselme
|
||||||
|
push: secondary
|
||||||
- match: '\_'
|
- match: '\_'
|
||||||
scope: variable.language.anselme
|
scope: variable.language.anselme
|
||||||
push: secondary
|
push: secondary
|
||||||
|
|
@ -98,7 +116,7 @@ contexts:
|
||||||
- match: '\;'
|
- match: '\;'
|
||||||
scope: keyword.control.anselme
|
scope: keyword.control.anselme
|
||||||
set: primary
|
set: primary
|
||||||
- match: '\-'
|
- match: '\-|\+'
|
||||||
scope: keyword.operator.arithmetic.anselme
|
scope: keyword.operator.arithmetic.anselme
|
||||||
set: primary
|
set: primary
|
||||||
- match: '\!'
|
- match: '\!'
|
||||||
|
|
@ -159,6 +177,7 @@ contexts:
|
||||||
scope: constant.character.escape.anselme
|
scope: constant.character.escape.anselme
|
||||||
|
|
||||||
string:
|
string:
|
||||||
|
- meta_include_prototype: false
|
||||||
- meta_scope: meta.string.anselme string.quoted.double.anselme
|
- meta_scope: meta.string.anselme string.quoted.double.anselme
|
||||||
- include: expression_interpolation
|
- include: expression_interpolation
|
||||||
- include: character_escape
|
- include: character_escape
|
||||||
|
|
@ -177,14 +196,18 @@ contexts:
|
||||||
## Other primary elements ##
|
## Other primary elements ##
|
||||||
|
|
||||||
parenthesis:
|
parenthesis:
|
||||||
|
- meta_include_prototype: false
|
||||||
- meta_scope: meta.parens.anselme
|
- meta_scope: meta.parens.anselme
|
||||||
- match: '\)'
|
- match: '\)'
|
||||||
scope: punctuation.section.parens.end.anselme
|
scope: punctuation.section.parens.end.anselme
|
||||||
set: secondary
|
set: secondary
|
||||||
|
- include: comments_and_whitespace
|
||||||
- include: primary
|
- include: primary
|
||||||
|
|
||||||
tuple:
|
tuple:
|
||||||
|
- meta_include_prototype: false
|
||||||
- meta_scope: meta.sequence.tuple.anselme
|
- meta_scope: meta.sequence.tuple.anselme
|
||||||
|
- include: comments_and_whitespace
|
||||||
- include: primary
|
- include: primary
|
||||||
- match: '\,'
|
- match: '\,'
|
||||||
scope: punctuation.separator.sequence.anselme
|
scope: punctuation.separator.sequence.anselme
|
||||||
|
|
@ -193,7 +216,9 @@ contexts:
|
||||||
set: secondary
|
set: secondary
|
||||||
|
|
||||||
struct:
|
struct:
|
||||||
|
- meta_include_prototype: false
|
||||||
- meta_scope: meta.mapping.anselme
|
- meta_scope: meta.mapping.anselme
|
||||||
|
- include: comments_and_whitespace
|
||||||
- include: primary
|
- include: primary
|
||||||
- match: '\,'
|
- match: '\,'
|
||||||
scope: punctuation.separator.sequence.anselme
|
scope: punctuation.separator.sequence.anselme
|
||||||
|
|
@ -210,9 +235,6 @@ contexts:
|
||||||
- match: '\,'
|
- match: '\,'
|
||||||
scope: punctuation.separator.sequence.anselme
|
scope: punctuation.separator.sequence.anselme
|
||||||
push: primary
|
push: primary
|
||||||
- match: '\|\>'
|
|
||||||
scope: keyword.control.conditional.anselme
|
|
||||||
push: primary
|
|
||||||
- match: '\#|\:\:|\:|\-\>'
|
- match: '\#|\:\:|\:|\-\>'
|
||||||
scope: keyword.operator.anselme
|
scope: keyword.operator.anselme
|
||||||
push: primary
|
push: primary
|
||||||
|
|
@ -222,7 +244,7 @@ contexts:
|
||||||
- match: '\=\=|\!\=|\<\=|\>\=|\<|\>'
|
- match: '\=\=|\!\=|\<\=|\>\=|\<|\>'
|
||||||
scope: keyword.operator.comparison.anselme
|
scope: keyword.operator.comparison.anselme
|
||||||
push: primary
|
push: primary
|
||||||
- match: '\+|\-|\*|\/\/|\/|\%|\^'
|
- match: '\+|\-|\*|\/|\%|\^'
|
||||||
scope: keyword.operator.arithmetic.anselme
|
scope: keyword.operator.arithmetic.anselme
|
||||||
push: primary
|
push: primary
|
||||||
- match: '\.'
|
- match: '\.'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue