Skip to content

Commit

Permalink
tag unknown identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-hykin committed Jul 11, 2024
1 parent 01ca0d4 commit 1092e46
Show file tree
Hide file tree
Showing 106 changed files with 13,365 additions and 3,314 deletions.
2 changes: 1 addition & 1 deletion autogenerated/cpp.embedded.macro.tmLanguage.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions autogenerated/cpp.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -3769,6 +3769,9 @@
},
{
"include": "#comma"
},
{
"include": "#unknown_variable"
}
]
},
Expand Down Expand Up @@ -16471,6 +16474,9 @@
},
{
"include": "#comma"
},
{
"include": "#unknown_variable"
}
],
"applyEndPatternLast": 1
Expand Down Expand Up @@ -18993,6 +18999,14 @@
}
}
},
"unknown_variable": {
"match": "((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))",
"captures": {
"1": {
"name": "variable.other.unknown.$1.cpp"
}
}
},
"using_name": {
"match": "(using)\\s+(?!namespace\\b)",
"captures": {
Expand Down
1 change: 1 addition & 0 deletions autogenerated/cpp_scopes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ variable.other.object.declare.cpp
variable.other.object.declare.for.cpp
variable.other.object.property.cpp
variable.other.property.cpp
variable.other.unknown.$1.cpp
variable.parameter.capture.cpp
variable.parameter.cpp
variable.parameter.initializer.cpp
Expand Down
4 changes: 3 additions & 1 deletion language_examples/#005.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
scopes:
- storage.type.primitive
- storage.type.built-in.primitive
- source: ' foo '
- source: foo
scopes:
- variable.other.unknown.foo
- source: '='
scopes:
- keyword.operator.assignment
Expand Down
4 changes: 3 additions & 1 deletion language_examples/#006.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
scopes:
- storage.type.primitive
- storage.type.built-in.primitive
- source: ' bar '
- source: bar
scopes:
- variable.other.unknown.bar
- source: '='
scopes:
- keyword.operator.assignment
Expand Down
64 changes: 48 additions & 16 deletions language_examples/#020.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: 'expression '
- source: expression
scopes:
- variable.other.unknown.expression
- source: +
scopes:
- keyword.operator.arithmetic
Expand All @@ -27,7 +29,9 @@
- source: +
scopes:
- keyword.operator.arithmetic
- source: ' thing'
- source: thing
scopes:
- variable.other.unknown.thing
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand All @@ -52,7 +56,9 @@
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: 'expression '
- source: expression
scopes:
- variable.other.unknown.expression
- source: +
scopes:
- keyword.operator.arithmetic
Expand All @@ -62,7 +68,9 @@
- source: +
scopes:
- keyword.operator.arithmetic
- source: ' thing'
- source: thing
scopes:
- variable.other.unknown.thing
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand All @@ -87,7 +95,9 @@
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: 'expression '
- source: expression
scopes:
- variable.other.unknown.expression
- source: +
scopes:
- keyword.operator.arithmetic
Expand All @@ -97,7 +107,9 @@
- source: +
scopes:
- keyword.operator.arithmetic
- source: ' thing'
- source: thing
scopes:
- variable.other.unknown.thing
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand All @@ -122,7 +134,9 @@
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: 'expression '
- source: expression
scopes:
- variable.other.unknown.expression
- source: +
scopes:
- keyword.operator.arithmetic
Expand All @@ -132,7 +146,9 @@
- source: +
scopes:
- keyword.operator.arithmetic
- source: ' thing'
- source: thing
scopes:
- variable.other.unknown.thing
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand Down Expand Up @@ -182,7 +198,9 @@
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: 'expression '
- source: expression
scopes:
- variable.other.unknown.expression
- source: +
scopes:
- keyword.operator.arithmetic
Expand All @@ -192,7 +210,9 @@
- source: +
scopes:
- keyword.operator.arithmetic
- source: ' thing'
- source: thing
scopes:
- variable.other.unknown.thing
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand All @@ -217,7 +237,9 @@
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: 'expression '
- source: expression
scopes:
- variable.other.unknown.expression
- source: +
scopes:
- keyword.operator.arithmetic
Expand All @@ -227,7 +249,9 @@
- source: +
scopes:
- keyword.operator.arithmetic
- source: ' thing'
- source: thing
scopes:
- variable.other.unknown.thing
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand All @@ -252,7 +276,9 @@
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: 'expression '
- source: expression
scopes:
- variable.other.unknown.expression
- source: +
scopes:
- keyword.operator.arithmetic
Expand All @@ -262,7 +288,9 @@
- source: +
scopes:
- keyword.operator.arithmetic
- source: ' thing'
- source: thing
scopes:
- variable.other.unknown.thing
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand All @@ -287,7 +315,9 @@
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: 'expression '
- source: expression
scopes:
- variable.other.unknown.expression
- source: +
scopes:
- keyword.operator.arithmetic
Expand All @@ -297,7 +327,9 @@
- source: +
scopes:
- keyword.operator.arithmetic
- source: ' thing'
- source: thing
scopes:
- variable.other.unknown.thing
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand Down
25 changes: 21 additions & 4 deletions language_examples/#022.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
scopes:
- punctuation.section.arguments.begin.bracket.round.function.call
- source: user_input
scopes:
- variable.other.unknown.user_input
- source: ','
scopes:
- punctuation.separator.delimiter.comma
Expand Down Expand Up @@ -33,10 +35,14 @@
scopes:
- keyword.operator.bitwise
- source: arg0
scopes:
- variable.other.unknown.arg0
- source: ','
scopes:
- punctuation.separator.delimiter.comma
- source: ' arg_str'
- source: arg_str
scopes:
- variable.other.unknown.arg_str
- source: )
scopes:
- punctuation.section.arguments.end.bracket.round.function.call
Expand Down Expand Up @@ -74,9 +80,11 @@
- punctuation.section.block.begin.bracket.curly.function.definition
scopesEnd:
- meta.head.function.definition
- source: ' t '
- source: t
scopesBegin:
- meta.body.function.definition
scopes:
- variable.other.unknown.t
- source: '='
scopes:
- keyword.operator.assignment
Expand All @@ -95,7 +103,9 @@
- source: ;
scopes:
- punctuation.terminator.statement
- source: ' tmp '
- source: tmp
scopes:
- variable.other.unknown.tmp
- source: '='
scopes:
- keyword.operator.assignment
Expand All @@ -109,6 +119,8 @@
scopes:
- keyword.operator.bitwise
- source: t
scopes:
- variable.other.unknown.t
- source: )
scopes:
- punctuation.section.arguments.end.bracket.round.function.call
Expand All @@ -122,6 +134,8 @@
scopes:
- punctuation.section.arguments.begin.bracket.round.function.call
- source: timestr
scopes:
- variable.other.unknown.timestr
- source: ','
scopes:
- punctuation.separator.delimiter.comma
Expand All @@ -135,6 +149,7 @@
- source: timestr
scopes:
- meta.arguments.operator.sizeof
- variable.other.unknown.timestr
- source: )
scopes:
- punctuation.section.arguments.end.bracket.round.operator.sizeof
Expand Down Expand Up @@ -162,7 +177,9 @@
- source: ','
scopes:
- punctuation.separator.delimiter.comma
- source: ' tmp'
- source: tmp
scopes:
- variable.other.unknown.tmp
- source: )
scopes:
- punctuation.section.arguments.end.bracket.round.function.call
Expand Down
30 changes: 26 additions & 4 deletions language_examples/#025.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
- source: (
scopes:
- punctuation.section.arguments.begin.bracket.round.function.call
- source: Stats aStats
- source: Stats
scopes:
- variable.other.unknown.Stats
- source: aStats
scopes:
- variable.other.unknown.aStats
- source: )
scopes:
- punctuation.section.arguments.end.bracket.round.function.call
Expand All @@ -25,7 +30,12 @@
- source: (
scopes:
- punctuation.section.arguments.begin.bracket.round.function.call
- source: ' Stats aStats'
- source: Stats
scopes:
- variable.other.unknown.Stats
- source: aStats
scopes:
- variable.other.unknown.aStats
- source: )
scopes:
- punctuation.section.arguments.end.bracket.round.function.call
Expand All @@ -42,7 +52,12 @@
- source: (
scopes:
- punctuation.section.arguments.begin.bracket.round.function.call
- source: ' Stats aStats'
- source: Stats
scopes:
- variable.other.unknown.Stats
- source: aStats
scopes:
- variable.other.unknown.aStats
- source: )
scopes:
- punctuation.section.arguments.end.bracket.round.function.call
Expand Down Expand Up @@ -70,12 +85,19 @@
- storage.type.primitive
- storage.type.built-in.primitive
- source: FillStats
scopes:
- variable.other.unknown.FillStats
- source: (
scopesBegin:
- meta.parens
scopes:
- punctuation.section.parens.begin.bracket.round
- source: ' Stats aStats'
- source: Stats
scopes:
- variable.other.unknown.Stats
- source: aStats
scopes:
- variable.other.unknown.aStats
- source: )
scopes:
- punctuation.section.parens.end.bracket.round
Expand Down
Loading

0 comments on commit 1092e46

Please sign in to comment.