diff --git a/Anselme.sublime-syntax b/Anselme.sublime-syntax index 84ad91e..7a01671 100755 --- a/Anselme.sublime-syntax +++ b/Anselme.sublime-syntax @@ -9,7 +9,7 @@ file_extensions: scope: source.anselme variables: - identifier: '[^\{\}\§\>\<\(\)\~\+\-\*\/\%\=\!\&\|\:\^\,\@\s\%\.\"\d][^\{\}\§\>\<\(\)\~\+\-\*\/\%\=\!\&\|\:\^\,\@\s\%\.\"]*' + identifier: '[^\{\}\§\>\<\(\)\~\+\-\*\/\%\=\!\&\|\:\^\,\@\s\.\#\"\d][^\{\}\§\>\<\(\)\~\+\-\*\/\%\=\!\&\|\:\^\,\@\s\.\#\"]*' contexts: main: @@ -49,14 +49,28 @@ contexts: push: brace_expression - match: '\\$' scope: keyword.other.anselme + - include: decorable + - match: '\n' + pop: true + + line_expression: + - include: expression + - include: decorable + - match: '\n' + pop: true + + decorable: - match: '~' scope: keyword.control.conditional.anselme set: line_expression - match: '#' scope: keyword.other.anselme set: line_expression - - match: '\n' - pop: true + - match: '(§)([^\~\#\§\n]*)' + captures: + 1: keyword.control.anselme + 2: entity.name.function.anselme + set: line_expression expression: - meta_scope: meta.group.anselme @@ -83,8 +97,6 @@ contexts: push: parenthesis_expression - match: '{{identifier}}' scope: variable.other.anselme - - match: '\n' - pop: true parenthesis_expression: - include: expression @@ -98,15 +110,6 @@ contexts: scope: keyword.other.anselme pop: true - line_expression: - - include: expression - - match: '~' - scope: keyword.control.conditional.anselme - set: line_expression - - match: '#' - scope: keyword.other.anselme - set: line_expression - string: - meta_scope: string.quoted.double - match: \" diff --git a/Comments.tmPreferences b/Comments.tmPreferences new file mode 100644 index 0000000..5b52388 --- /dev/null +++ b/Comments.tmPreferences @@ -0,0 +1,21 @@ + + + + name + Comments + scope + source.anselme + settings + + shellVariables + + + name + TM_COMMENT_START + value + ( + + + + + diff --git a/Indent.tmPreferences b/Indent.tmPreferences new file mode 100644 index 0000000..7395c73 --- /dev/null +++ b/Indent.tmPreferences @@ -0,0 +1,14 @@ + + + + name + Indent + scope + source.anselme + settings + + increaseIndentPattern + ^\s*[§>~#] + + +