Skip to content

Commit

Permalink
feat: update language pack grammars
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Aug 14, 2024
1 parent bdbfa25 commit 5313759
Show file tree
Hide file tree
Showing 23 changed files with 1,922 additions and 1,291 deletions.
122 changes: 61 additions & 61 deletions org.eclipse.tm4e.language_pack/README.md

Large diffs are not rendered by default.

124 changes: 62 additions & 62 deletions org.eclipse.tm4e.language_pack/about.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion org.eclipse.tm4e.language_pack/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
<!-- ======================================== -->
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type id="org.eclipse.tm4e.language_pack.cpp" name="C++" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
file-extensions="c++,cc,cpp,cxx,h,h++,hh,hpp,hxx,ii,inl,ino,ipp,ixx,tpp,txx" file-patterns="*.h.in,*.hpp.in" />
file-extensions="c++,c++m,cc,ccm,cpp,cppm,cxx,cxxm,h,h++,hh,hpp,hxx,ii,inl,ino,ipp,ixx,tpp,txx" file-patterns="*.h.in,*.hpp.in" />
</extension>
<extension point="org.eclipse.tm4e.registry.grammars">
<grammar scopeName="source.cpp" path="syntaxes/cpp/cpp.tmLanguage.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] }
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] },
{ "open": "/**", "close": " */", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] }
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] },
{ "open": "/**", "close": " */", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] }
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] },
{ "open": "/**", "close": " */", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
Expand Down
46 changes: 31 additions & 15 deletions org.eclipse.tm4e.language_pack/syntaxes/dart/dart.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/dart-lang/dart-syntax-highlight/commit/272e2f89f85073c04b7e15b582257f76d2489970",
"version": "https://github.com/dart-lang/dart-syntax-highlight/commit/bb8f7eebf5a1028e70dbebcf35cfef738dddc7fe",
"name": "Dart",
"scopeName": "source.dart",
"patterns": [
Expand All @@ -14,7 +14,7 @@
},
{
"name": "meta.declaration.dart",
"begin": "^\\w*\\b(library|import|part of|part|export)\\b",
"begin": "^\\w*\\b(augment\\s+library|library|import\\s+augment|import|part\\s+of|part|export)\\b",
"beginCaptures": {
"0": {
"name": "keyword.other.import.dart"
Expand Down Expand Up @@ -208,7 +208,7 @@
},
{
"name": "variable.language.dart",
"match": "(?<!\\$)\\b(this|super)\\b(?!\\$)"
"match": "(?<!\\$)\\b(this|super|augmented)\\b(?!\\$)"
},
{
"name": "constant.numeric.dart",
Expand Down Expand Up @@ -328,11 +328,11 @@
},
{
"name": "keyword.declaration.dart",
"match": "(?<!\\$)\\b(abstract|sealed|base|interface|class|enum|extends|extension type|extension|external|factory|implements|get(?![(<])|mixin|native|operator|set(?![(<])|typedef|with|covariant)\\b(?!\\$)"
"match": "(?<!\\$)\\b(abstract|sealed|base|interface|class|enum|extends|extension\\s+type|extension|external|factory|implements|get(?![(<])|mixin|native|operator|set(?![(<])|typedef|with|covariant)\\b(?!\\$)"
},
{
"name": "storage.modifier.dart",
"match": "(?<!\\$)\\b(static|final|const|required|late)\\b(?!\\$)"
"match": "(?<!\\$)\\b(macro|augment|static|final|const|required|late)\\b(?!\\$)"
},
{
"name": "storage.type.primitive.dart",
Expand Down Expand Up @@ -388,10 +388,33 @@
}
]
},
"expression": {
"patterns": [
{
"include": "#constants-and-special-vars"
},
{
"include": "#strings"
},
{
"name": "variable.parameter.dart",
"match": "[a-zA-Z0-9_]+"
},
{
"begin": "\\{",
"end": "\\}",
"patterns": [
{
"include": "#expression"
}
]
}
]
},
"string-interp": {
"patterns": [
{
"name": "string.interpolated.expression.dart",
"name": "meta.embedded.expression.dart",
"match": "\\$([a-zA-Z0-9_]+)",
"captures": {
"1": {
Expand All @@ -400,19 +423,12 @@
}
},
{
"name": "string.interpolated.expression.dart",
"name": "meta.embedded.expression.dart",
"begin": "\\$\\{",
"end": "\\}",
"patterns": [
{
"include": "#constants-and-special-vars"
},
{
"include": "#strings"
},
{
"name": "variable.parameter.dart",
"match": "[a-zA-Z0-9_]+"
"include": "#expression"
}
]
},
Expand Down
76 changes: 61 additions & 15 deletions org.eclipse.tm4e.language_pack/syntaxes/go/go.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/worlpaker/go-syntax/commit/6b7e1ad89c031a35a2bf8359538204bcef82f5be",
"version": "https://github.com/worlpaker/go-syntax/commit/092c45ec9a51fe40188408d1371f123eaa4796fa",
"name": "Go",
"scopeName": "source.go",
"patterns": [
Expand Down Expand Up @@ -32,6 +32,9 @@
},
{
"include": "#group-variables"
},
{
"include": "#field_hover"
}
]
},
Expand Down Expand Up @@ -265,8 +268,18 @@
},
"language_constants": {
"comment": "Language constants",
"match": "\\b(true|false|nil|iota)\\b",
"name": "constant.language.go"
"match": "\\b(?:(true|false)|(nil)|(iota))\\b",
"captures": {
"1": {
"name": "constant.language.boolean.go"
},
"2": {
"name": "constant.language.null.go"
},
"3": {
"name": "constant.language.iota.go"
}
}
},
"comments": {
"patterns": [
Expand Down Expand Up @@ -2367,8 +2380,8 @@
},
{
"comment": "make keyword",
"match": "(?:(\\bmake\\b)(?:(\\()((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?(?:\\[(?:[^\\]]+)?\\])?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?)?((?:\\,\\s*(?:[\\w\\.\\(\\)/\\+\\-\\<\\>\\&\\|\\%\\*]+)?)+)?(\\))))",
"captures": {
"begin": "(?:(\\bmake\\b)(?:(\\()((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?:[\\[\\]\\*]+)?(?:(?!\\bmap\\b)(?:[\\w\\.]+))?(\\[(?:(?:[\\S]+)(?:(?:\\,\\s*(?:[\\S]+))*))?\\])?(?:\\,)?)?))",
"beginCaptures": {
"1": {
"name": "entity.name.function.support.builtin.go"
},
Expand All @@ -2388,18 +2401,19 @@
"name": "entity.name.type.go"
}
]
},
"4": {
"patterns": [
{
"include": "$self"
}
]
},
"5": {
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.end.bracket.round.go"
}
}
},
"patterns": [
{
"include": "$self"
}
]
}
]
},
Expand Down Expand Up @@ -2900,6 +2914,38 @@
}
}
},
"field_hover": {
"comment": "struct field property and types when hovering with the mouse",
"match": "(?:(?<=^\\bfield\\b)\\s+([\\w\\*\\.]+)\\s+([\\s\\S]+))",
"captures": {
"1": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.property.go"
}
]
},
"2": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\binvalid\\b\\s+\\btype\\b",
"name": "invalid.field.go"
},
{
"match": "\\w+",
"name": "entity.name.type.go"
}
]
}
}
},
"other_variables": {
"comment": "all other variables",
"match": "\\w+",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
},
"indentationRules": {
"decreaseIndentPattern": {
"pattern": "^((?!.*?/\\*).*\\*\/)?\\s*[\\}\\]\\)].*$"
"pattern": "^\\s*[\\}\\]\\)].*$"
},
"increaseIndentPattern": {
"pattern": "^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
"pattern": "^.*(\\{[^}]*|\\([^)]*|\\[[^\\]]*)$"
},
// e.g. * ...| or */| or *-----*/|
"unIndentedLinePattern": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
},
"indentationRules": {
"decreaseIndentPattern": {
"pattern": "^((?!.*?/\\*).*\\*\/)?\\s*[\\}\\]\\)].*$"
"pattern": "^\\s*[\\}\\]\\)].*$"
},
"increaseIndentPattern": {
"pattern": "^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
"pattern": "^.*(\\{[^}]*|\\([^)]*|\\[[^\\]]*)$"
},
// e.g. * ...| or */| or *-----*/|
"unIndentedLinePattern": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/c56f92f8120ae9046a064de6351b50b3b5c624a1",
"version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/663bf8d943fd8440f4ae7565f73327dd616bf191",
"name": "Julia",
"scopeName": "source.julia",
"comment": "This grammar is used by Atom (Oniguruma), GitHub (PCRE), and VSCode (Oniguruma),\nso all regexps must be compatible with both engines.\n\nSpecs:\n- https://github.com/kkos/oniguruma/blob/master/doc/RE\n- https://www.pcre.org/current/doc/html/",
Expand Down Expand Up @@ -321,7 +321,7 @@
"name": "keyword.control.export.julia"
},
{
"match": "\\b(?<![:_])(?:public)\\b",
"match": "^(?:public)\\b",
"name": "keyword.control.public.julia"
},
{
Expand Down
Loading

0 comments on commit 5313759

Please sign in to comment.