Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SQL] Resolve merge commits #16

Merged
merged 5 commits into from
May 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 35 additions & 48 deletions D/D.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -786,13 +786,13 @@ contexts:
scope: keyword.other.d
set: [basic-type2, function-type]
- match: '!(?!=|is\b)'
scope: meta.function-call.d keyword.operator.d
scope: meta.function-call.template.d keyword.operator.d
set:
- match: '\('
scope: punctuation.section.parens.begin.d
set: [basic-type2, basic-type2-after-call, value-list]
- match: '(?=\S)'
set: [basic-type2, meta-function-call, value-template-single]
set: [basic-type2, meta-function-call-template, value-template-single]
- match: '\.(?!\.\.)'
scope: storage.type.d
set:
Expand All @@ -812,7 +812,7 @@ contexts:
pop: true
- include: not-whitespace-illegal-pop
basic-type2-after-call:
- meta_scope: meta.function-call.d
- meta_scope: meta.function-call.template.d
- include: basic-type2-after-parens

typeof-value:
Expand Down Expand Up @@ -1024,11 +1024,13 @@ contexts:
- match: ','
scope: punctuation.separator.sequence.d
set: variable-definition-begin
- match: '(?=\))'
pop: true
- include: expect-end-of-line

value-or-declaration-in:
- match: '{{definitely_value_lookahead}}'
push: [maybe-end-of-line, value-list]
push: [maybe-end-of-line, value-array-list]
- match: '{{definitely_declaration_lookahead}}'
push: [function-or-variable-after-type, type]
- match: '(?=\S)'
Expand All @@ -1054,24 +1056,24 @@ contexts:
# Match a regular function call so we properly highlight the name as a
# function
- match: '(?=[[:alpha:]0-9_\.]+\s*\()'
set: value-list
set: value-array-list
- match: '{{name_lookahead}}'
scope: variable.other.d
set: [first-value-after, value-identifier]
- match: '(?=\S)'
set: value-list
set: value-array-list
first-value-after:
- match: '\.'
scope: meta.path.d punctuation.accessor.dot.d
push: value-identifier
- match: '!(?!=|is\b)'
scope: meta.function-call.d keyword.operator.d
scope: meta.function-call.template.d keyword.operator.d
set:
- match: '\('
scope: punctuation.section.parens.begin.d
set: [first-value-call-after, value-list]
- match: '(?=\S)'
set: [first-value-after, meta-function-call, value-template-single]
set: [first-value-after, meta-function-call-template, value-template-single]
- match: '\['
scope: punctuation.section.brackets.begin.d
set: [first-value-bracket-after, value-list]
Expand Down Expand Up @@ -1101,17 +1103,10 @@ contexts:
set: first-value-after
- include: not-whitespace-illegal-pop
first-value-call-after:
- meta_scope: meta.function-call.d
- meta_scope: meta.function-call.template.d
- include: first-value-parens-after

value:
- match: '\b({{name}})\s*(:)'
captures:
1: variable.other.d
2: punctuation.separator.key-value.d
set: value
- include: value-no-mapping-key
value-no-mapping-key:
- include: attribute-in
- match: '!'
scope: keyword.operator.logical.d
Expand Down Expand Up @@ -1272,7 +1267,7 @@ contexts:
- meta_scope: meta.function-call.d
- match: '\('
scope: punctuation.section.parens.begin.d
set: [value-call-parens-after, value-list]
set: [meta-function-call, value-parens-after, value-list]
- match: (?=\S)
set: value-after
new-anonymous-after-args:
Expand Down Expand Up @@ -1365,7 +1360,10 @@ contexts:
set: [meta-function, value]
- include: not-whitespace-illegal-pop
value-identifier:
- match: '\b{{name}}\b(?=\s*(\(|!(?!=|is\b)))'
- match: '\b{{name}}\b(?=\s*!(?!=|is\b))'
scope: meta.function-call.template.d meta.path.d variable.function.d
pop: true
- match: '\b{{name}}\b(?=\s*\()'
scope: meta.function-call.d meta.path.d variable.function.d
pop: true
- match: '\b{{name}}\b'
Expand All @@ -1386,7 +1384,7 @@ contexts:
set: [value-after, value-identifier]
- match: '\('
scope: punctuation.section.parens.begin.d
set: [value-call-parens-after, value-list]
set: [meta-function-call, value-parens-after, value-list]
- match: '\['
scope: punctuation.section.brackets.begin.d
set: [value-bracket-after, value-list]
Expand Down Expand Up @@ -1415,13 +1413,13 @@ contexts:
scope: keyword.operator.assignment.d
set: value
- match: '!'
scope: meta.function-call.d punctuation.section.generic.begin.d
scope: meta.function-call.template.d punctuation.section.generic.begin.d
set:
- match: '\('
scope: punctuation.section.parens.begin.d
set: [value-call-parens-after, value-list]
set: [meta-function-call-template, value-parens-after, value-list]
- match: '(?=\S)'
set: [value-after, meta-function-call, value-template-single]
set: [value-after, meta-function-call-template, value-template-single]
- match: \*(?=\s*[\),;\]\*])
scope: keyword.operator.pointer.d
set: value-maybe-pointer-after
Expand Down Expand Up @@ -1464,21 +1462,18 @@ contexts:
set: value
value-condition:
- match: (?=:)
pop: 1
- include: value-no-mapping-key
pop: true
- include: value
value-condition-after:
- match: ':'
scope: keyword.operator.ternary.d
set: value-no-mapping-key
set: value
- include: not-whitespace-illegal-pop
value-parens-after:
- match: '\)'
scope: punctuation.section.parens.end.d
set: value-after
- include: not-whitespace-illegal-pop
value-call-parens-after:
- meta_scope: meta.function-call.d
- include: value-parens-after
value-bracket-after:
- match: '\]'
scope: punctuation.section.brackets.end.d
Expand All @@ -1498,21 +1493,8 @@ contexts:
set: value-list
- include: not-whitespace-illegal-pop

value-list-no-mapping-key:
- match: '(?=\)|}|]|;|:)'
pop: true
- match: '(?=\S)'
set: [value-list-after-no-mapping-key, value-no-mapping-key]
value-list-after-no-mapping-key:
- match: '(?=\)|}|]|;|:)'
pop: true
- match: ','
scope: punctuation.separator.sequence.d
set: value-list-no-mapping-key
- include: not-whitespace-illegal-pop

value-array-list:
- match: '(?=\])'
- match: '(?=\)|}|]|;)'
pop: true
- match: '(?=\S)'
set: [value-array-list-after, value]
Expand All @@ -1522,7 +1504,7 @@ contexts:
set: [value-array-list-after-value, value]
- include: value-array-list-after-value
value-array-list-after-value:
- match: '(?=\])'
- match: '(?=\)|}|]|;)'
pop: true
- match: ','
scope: punctuation.separator.sequence.d
Expand Down Expand Up @@ -1875,7 +1857,7 @@ contexts:
scope: punctuation.section.group.end.d
set: function-definition-after-first-argument-list
- match: '(?=\S)'
set: [function-definition-after-first-argument-list, meta-function-parameters, function-argument]
set: [function-definition-after-first-argument-list, meta-function-parameters, function-argument, function-argument-or-type]
destructor-arguments:
- match: '\('
scope: meta.function.parameters.d punctuation.section.group.begin.d
Expand Down Expand Up @@ -2098,7 +2080,7 @@ contexts:
- include: not-whitespace-illegal-pop
- match: '\bcase\b'
scope: keyword.control.flow.d
push: [case-after, value-list-no-mapping-key]
push: [case-after, value-list]
- match: '\bdefault\b'
scope: keyword.control.flow.d
push:
Expand All @@ -2120,7 +2102,7 @@ contexts:
set:
- match: '\bcase\b'
scope: keyword.control.flow.d
set: [case-after, value-no-mapping-key]
set: [case-after, value]
- include: not-whitespace-illegal-pop
- match: '(?=\S)'
pop: true
Expand Down Expand Up @@ -2188,7 +2170,7 @@ contexts:
condition:
- match: '\('
scope: punctuation.section.parens.begin.d
set: [condition-after, value]
set: [condition-after, first-value]
- include: not-whitespace-illegal-pop
condition-after:
- match: '\)'
Expand All @@ -2215,7 +2197,7 @@ contexts:

type-identifier:
- match: '\b{{name}}\b(?=\s*!)'
scope: meta.function-call.d meta.path.d variable.function.d
scope: meta.function-call.template.d meta.path.d variable.function.d
pop: true
- match: '\b{{name}}\b'
scope: meta.path.d storage.type.d
Expand Down Expand Up @@ -2295,6 +2277,11 @@ contexts:
- match: ''
pop: true

meta-function-call-template:
- meta_scope: meta.function-call.template.d
- match: ''
pop: true

meta-class:
- meta_scope: meta.class.d
- match: ''
Expand Down
Loading