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 Oct 23, 2024
1 parent 513eb04 commit 276e357
Show file tree
Hide file tree
Showing 17 changed files with 1,067 additions and 531 deletions.
122 changes: 61 additions & 61 deletions org.eclipse.tm4e.language_pack/README.md

Large diffs are not rendered by default.

132 changes: 66 additions & 66 deletions org.eclipse.tm4e.language_pack/about.html

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions org.eclipse.tm4e.language_pack/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@
<!-- ======================================== -->
<extension point="org.eclipse.tm4e.registry.grammars">
<grammar scopeName="markdown.math.block" path="syntaxes/markdown-math/markdown.math.block.tmLanguage.json" />
<grammar scopeName="markdown.math.codeblock" path="syntaxes/markdown-math/markdown.math.codeblock.tmLanguage.json" />
<grammar scopeName="markdown.math.inline" path="syntaxes/markdown-math/markdown.math.inline.tmLanguage.json" />
</extension>

Expand Down Expand Up @@ -1266,7 +1267,7 @@
<!-- ======================================== -->
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type id="org.eclipse.tm4e.language_pack.shellscript" name="Shell Script" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
file-extensions="Xsession,bash,bash_aliases,bash_login,bash_logout,bash_profile,bashrc,csh,cshrc,ebuild,fish,ksh,profile,sh,tcshrc,xprofile,xsession,xsessionrc,yash_profile,yashrc,zlogin,zlogout,zprofile,zsh,zsh-theme,zshenv,zshrc" file-names=".envrc,.hushlogin,APKBUILD,PKGBUILD,bashrc_Apple_Terminal,zlogin,zlogout,zprofile,zshenv,zshrc,zshrc_Apple_Terminal" file-patterns=".env.*" />
file-extensions="Xsession,bash,bash_aliases,bash_login,bash_logout,bash_profile,bashrc,csh,cshrc,ebuild,eclass,fish,ksh,profile,sh,tcshrc,xprofile,xsession,xsessionrc,yash_profile,yashrc,zlogin,zlogout,zprofile,zsh,zsh-theme,zshenv,zshrc" file-names=".envrc,.hushlogin,APKBUILD,PKGBUILD,bashrc_Apple_Terminal,zlogin,zlogout,zprofile,zshenv,zshrc,zshrc_Apple_Terminal" file-patterns=".env.*" />
</extension>
<extension point="org.eclipse.tm4e.registry.grammars">
<grammar scopeName="source.shell" path="syntaxes/shellscript/shellscript.tmLanguage.json" />
Expand All @@ -1282,10 +1283,10 @@
</extension>

<!-- ======================================== -->
<!-- sql/sql: SQL -->
<!-- sql/sql: MS SQL -->
<!-- ======================================== -->
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type id="org.eclipse.tm4e.language_pack.sql" name="SQL" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
<content-type id="org.eclipse.tm4e.language_pack.sql" name="MS SQL" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
file-extensions="dsql,sql" />
</extension>
<extension point="org.eclipse.tm4e.registry.grammars">
Expand All @@ -1298,7 +1299,7 @@
</extension>

<extension point="org.eclipse.tm4e.ui.snippets">
<snippet name="SQL Example" path="syntaxes/sql/sql.example.sql" scopeName="source.sql" />
<snippet name="MS SQL Example" path="syntaxes/sql/sql.example.sql" scopeName="source.sql" />
</extension>

<!-- ======================================== -->
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/dotnet/csharp-tmLanguage/commit/7a7482ffc72a6677a87eb1ed76005593a4f7f131",
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/d63e2661d4e0c83b6c7810eb1d0eedc5da843b04",
"name": "C#",
"scopeName": "source.cs",
"patterns": [
Expand Down Expand Up @@ -512,6 +512,9 @@
{
"include": "#type-name"
},
{
"include": "#type-arguments"
},
{
"include": "#attribute-arguments"
}
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/ionide/ionide-fsgrammar/commit/7d029a46f17637228b2ee85dd02e511c3e8039b3",
"version": "https://github.com/ionide/ionide-fsgrammar/commit/7d1b695da917dc4c7a0f7fb4683f42da208f87a2",
"name": "fsharp",
"scopeName": "source.fsharp",
"patterns": [
Expand Down Expand Up @@ -617,7 +617,7 @@
},
{
"name": "constant.numeric.float.fsharp",
"match": "\\b-?[0-9][0-9_]*((\\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"
"match": "\\b-?[0-9][0-9_]*((\\.(?!\\.)([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"
},
{
"name": "constant.numeric.integer.nativeint.fsharp",
Expand All @@ -635,7 +635,7 @@
},
"abstract_definition": {
"name": "abstract.definition.fsharp",
"begin": "\\b(abstract)\\s+(member)?(\\s+\\[\\<.*\\>\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(<)?",
"begin": "\\b(static)?\\s+(abstract)\\s+(member)?(\\s+\\[\\<.*\\>\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(<)?",
"end": "\\s*(with)\\b|=|$",
"beginCaptures": {
"1": {
Expand All @@ -645,6 +645,9 @@
"name": "keyword.fsharp"
},
"3": {
"name": "keyword.fsharp"
},
"4": {
"name": "support.function.attribute.fsharp"
},
"5": {
Expand Down Expand Up @@ -838,7 +841,7 @@
"name": "keyword.symbol.fsharp"
}
},
"end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]+))+)",
"end": "(\\)\\s*(([?[:alpha:]0-9'`^._ ]+))*)",
"endCaptures": {
"1": {
"name": "keyword.symbol.fsharp"
Expand Down Expand Up @@ -933,7 +936,7 @@
"patterns": [
{
"name": "binding.fsharp",
"begin": "\\b(let mutable|static let mutable|static let|let inline|let|and|member val|static member inline|static member|default|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
"begin": "\\b(let mutable|static let mutable|static let|let inline|let|and|member val|member inline|static member inline|static member|default|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
"end": "\\s*((with\\b)|(=|\\n+=|(?<=\\=)))",
"beginCaptures": {
"1": {
Expand Down Expand Up @@ -1008,7 +1011,7 @@
},
{
"name": "binding.fsharp",
"begin": "\\b(static val mutable|val mutable|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
"begin": "\\b(static val mutable|val mutable|val inline|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
"end": "\\n$",
"beginCaptures": {
"1": {
Expand Down
113 changes: 40 additions & 73 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/092c45ec9a51fe40188408d1371f123eaa4796fa",
"version": "https://github.com/worlpaker/go-syntax/commit/21f28840e04d4fa04682d19d6fe64de437f40b64",
"name": "Go",
"scopeName": "source.go",
"patterns": [
Expand Down Expand Up @@ -321,7 +321,7 @@
"name": "punctuation.definition.begin.bracket.square.go"
}
},
"end": "(?:(\\])((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?!(?:[\\[\\]\\*]+)?\\b(?:func|struct|map)\\b)(?:[\\*\\[\\]]+)?(?:[\\w\\.]+))?)",
"end": "(?:(\\])((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?!(?:[\\[\\]\\*]+)?\\b(?:func|struct|map)\\b)(?:[\\*\\[\\]]+)?(?:[\\w\\.]+)(?:\\[(?:(?:[\\w\\.\\*\\[\\]\\{\\}]+)(?:(?:\\,\\s*(?:[\\w\\.\\*\\[\\]\\{\\}]+))*))?\\])?)?)",
"endCaptures": {
"1": {
"name": "punctuation.definition.end.bracket.square.go"
Expand Down Expand Up @@ -1862,7 +1862,7 @@
},
{
"comment": "property variables and types",
"match": "(?:((?:(?:\\w+\\,\\s*)+)?(?:\\w+\\s+))([\\s\\S]+))",
"match": "(?:((?:(?:\\w+\\,\\s*)+)?(?:\\w+\\s+))([^\\`]+))",
"captures": {
"1": {
"patterns": [
Expand Down Expand Up @@ -2007,6 +2007,29 @@
}
]
},
{
"comment": "one type only with multi line raw string",
"begin": "(?:((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?<!\\,\\s*)(?:[\\w\\.\\*]+)\\s*)(?=\\`))",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "entity.name.type.go"
}
]
}
},
"end": "(?=\\`)",
"patterns": [
{
"include": "#raw_string_literals"
}
]
},
{
"include": "#parameter-variable-types"
}
Expand Down Expand Up @@ -2192,7 +2215,7 @@
]
}
},
"end": "(?:(?<=\\])((?:\\s+)(?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:(?!(?:[\\[\\]\\*]+)?(?:\\bstruct\\b|\\binterface\\b|\\bfunc\\b))[\\w\\.\\-\\*\\[\\]]+))?)",
"end": "(?:(?<=\\])((?:\\s+)(?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:(?!(?:[\\[\\]\\*]+)?(?:\\bstruct\\b|\\binterface\\b|\\bfunc\\b))[\\w\\.\\-\\*\\[\\]]+(?:\\,\\s+[\\w\\.\\[\\]\\*]+)*))?)",
"endCaptures": {
"1": {
"patterns": [
Expand Down Expand Up @@ -2271,6 +2294,9 @@
{
"include": "#struct_variables_types"
},
{
"include": "#interface_variables_types"
},
{
"include": "#type-declarations-without-brackets"
},
Expand Down Expand Up @@ -2439,7 +2465,7 @@
},
"switch_types": {
"comment": "switch type assertions, only highlights types after case keyword",
"begin": "(?<=\\bswitch\\b)(?:\\s*)(?:(\\w+\\s*\\:\\=)?\\s*([\\w\\.\\*\\(\\)\\[\\]]+))(\\.\\(\\btype\\b\\)\\s*)(\\{)",
"begin": "(?<=\\bswitch\\b)(?:\\s*)(?:(\\w+\\s*\\:\\=)?\\s*([\\w\\.\\*\\(\\)\\[\\]\\+/\\-\\%\\<\\>\\|\\&]+))(\\.\\(\\btype\\b\\)\\s*)(\\{)",
"beginCaptures": {
"1": {
"patterns": [
Expand Down Expand Up @@ -2770,7 +2796,7 @@
},
"slice_index_variables": {
"comment": "slice index and capacity variables, to not scope them as property variables",
"match": "(?<=\\w\\[)((?:(?:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+\\:)|(?:\\:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+))(?:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+)?(?:\\:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+)?)(?=\\])",
"match": "(?<=\\w\\[)((?:(?:\\b[\\w\\.\\*\\+/\\-\\%\\<\\>\\|\\&]+\\:)|(?:\\:\\b[\\w\\.\\*\\+/\\-\\%\\<\\>\\|\\&]+))(?:\\b[\\w\\.\\*\\+/\\-\\%\\<\\>\\|\\&]+)?(?:\\:\\b[\\w\\.\\*\\+/\\-\\%\\<\\>\\|\\&]+)?)(?=\\])",
"captures": {
"1": {
"patterns": [
Expand All @@ -2786,8 +2812,8 @@
}
},
"property_variables": {
"comment": "Property variables in struct | parameter field in struct initialization",
"match": "(?:(?:((?:\\b[\\w\\.]+)(?:\\:(?!\\=))))(?:(?:\\s*([\\w\\.\\*\\&\\[\\]]+)(\\.\\w+)(?![\\w\\.\\*\\&\\[\\]]*(?:\\{|\\()))((?:\\s*(?:\\<|\\>|\\<\\=|\\>\\=|\\=\\=|\\!\\=|\\|\\||\\&\\&|\\+|/|\\-|\\*|\\%|\\||\\&)\\s*(?:[\\w\\.\\*\\&\\[\\]]+)(?:\\.\\w+)(?![\\w\\.\\*\\&\\[\\]]*(?:\\{|\\()))*))?)",
"comment": "Property variables in struct",
"match": "((?:\\b[\\w\\.]+)(?:\\:(?!\\=)))",
"captures": {
"1": {
"patterns": [
Expand All @@ -2799,68 +2825,6 @@
"name": "variable.other.property.go"
}
]
},
"2": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.go"
},
{
"include": "$self"
}
]
},
"3": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.property.field.go"
},
{
"include": "$self"
}
]
},
"4": {
"patterns": [
{
"match": "([\\w\\.\\*\\&\\[\\]]+)(\\.\\w+)",
"captures": {
"1": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.go"
}
]
},
"2": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.property.field.go"
}
]
}
}
},
{
"include": "$self"
}
]
}
}
},
Expand Down Expand Up @@ -2931,13 +2895,16 @@
},
"2": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\binvalid\\b\\s+\\btype\\b",
"name": "invalid.field.go"
},
{
"include": "#type-declarations-without-brackets"
},
{
"include": "#parameter-variable-types"
},
{
"match": "\\w+",
"name": "entity.name.type.go"
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/663bf8d943fd8440f4ae7565f73327dd616bf191",
"version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/c686684f18153687886e7d19c1bfc3a33076b1ab",
"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 @@ -333,7 +333,7 @@
"name": "keyword.control.using.julia"
},
{
"match": "(?<=\\w\\s)\\b(as)\\b(?=\\s\\w)",
"match": "(?<=\\S\\s+)\\b(as)\\b(?=\\s+\\S)",
"name": "keyword.control.as.julia"
},
{
Expand Down
Loading

0 comments on commit 276e357

Please sign in to comment.