Skip to content

Commit

Permalink
Update grammars and fix julia update script for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Mar 3, 2021
1 parent 0e94794 commit 6949fed
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 92 deletions.
2 changes: 1 addition & 1 deletion extensions/julia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"vscode": "0.10.x"
},
"scripts": {
"update-grammar": "node ../node_modules/.bin/vscode-grammar-updater JuliaEditorSupport/atom-language-julia grammars/julia_vscode.json ./syntaxes/julia.tmLanguage.json"
"update-grammar": "node ../node_modules/vscode-grammar-updater/bin JuliaEditorSupport/atom-language-julia grammars/julia_vscode.json ./syntaxes/julia.tmLanguage.json"
},
"contributes": {
"languages": [
Expand Down
2 changes: 1 addition & 1 deletion extensions/make/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "fadeevab/make.tmbundle",
"repositoryUrl": "https://github.com/fadeevab/make.tmbundle",
"commitHash": "e36e02becd20730259b0115d9ca5c419f65023a9"
"commitHash": "91b724d1ad86fa65e4b240a960311a280b92f971"
}
},
"licenseDetail": [
Expand Down
49 changes: 12 additions & 37 deletions extensions/make/syntaxes/make.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/fadeevab/make.tmbundle/commit/e36e02becd20730259b0115d9ca5c419f65023a9",
"version": "https://github.com/fadeevab/make.tmbundle/commit/91b724d1ad86fa65e4b240a960311a280b92f971",
"name": "Makefile",
"scopeName": "source.makefile",
"patterns": [
Expand All @@ -29,7 +29,7 @@
],
"repository": {
"comment": {
"begin": "(^[ \\t]+)?(?=#)",
"begin": "(^[ ]+)?(?=#)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.makefile"
Expand Down Expand Up @@ -130,9 +130,6 @@
{
"include": "#variables"
},
{
"include": "#comment"
},
{
"include": "#directives"
}
Expand Down Expand Up @@ -195,37 +192,7 @@
]
},
{
"begin": "^\\s*(ifdef|ifndef)\\s*([^\\s]+)(?=\\s)",
"captures": {
"1": {
"name": "keyword.control.$1.makefile"
},
"2": {
"name": "variable.other.makefile"
},
"3": {
"name": "punctuation.separator.key-value.makefile"
}
},
"end": "^\\s*(endif)\\b",
"name": "meta.scope.conditional.makefile",
"patterns": [
{
"begin": "\\G(?!\\n)",
"end": "^",
"patterns": [
{
"include": "#comment"
}
]
},
{
"include": "$self"
}
]
},
{
"begin": "^\\s*(ifeq|ifneq)(?=\\s)",
"begin": "^\\s*(ifeq|ifneq|ifdef|ifndef)(?=\\s)",
"captures": {
"1": {
"name": "keyword.control.$1.makefile"
Expand Down Expand Up @@ -254,7 +221,15 @@
"name": "keyword.control.else.makefile"
}
},
"end": "^"
"end": "^",
"patterns": [
{
"include": "#variables"
},
{
"include": "#comment"
}
]
},
{
"include": "$self"
Expand Down
66 changes: 53 additions & 13 deletions extensions/swift/syntaxes/swift.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/textmate/swift.tmbundle/commit/d31bae2e0d6a4d977187dc7f06f538d6ba56b89b",
"version": "https://github.com/textmate/swift.tmbundle/commit/2ee3d7c63f7dd2c769167278b48e3716d1b60b26",
"name": "Swift",
"scopeName": "source.swift",
"comment": "See swift.tmbundle/grammar-test.swift for test cases.",
Expand All @@ -14,6 +14,20 @@
}
],
"repository": {
"async-throws": {
"captures": {
"1": {
"name": "invalid.illegal.await-must-precede-throws.swift"
},
"2": {
"name": "keyword.control.exception.swift"
},
"3": {
"name": "keyword.control.async.swift"
}
},
"match": "\\b(?:(throws\\s+async|rethrows\\s+async)|(throws|rethrows)|(async))\\b"
},
"attributes": {
"patterns": [
{
Expand Down Expand Up @@ -791,6 +805,10 @@
{
"include": "#attributes"
},
{
"match": "\\basync\\b",
"name": "keyword.control.async.swift"
},
{
"match": "\\b(?:throws|rethrows)\\b",
"name": "keyword.control.exception.swift"
Expand Down Expand Up @@ -999,8 +1017,7 @@
"include": "#function-result"
},
{
"match": "\\b(?:throws|rethrows)\\b",
"name": "keyword.control.exception.swift"
"include": "#async-throws"
},
{
"comment": "Swift 3: generic constraints after the parameters and return type",
Expand Down Expand Up @@ -1054,8 +1071,7 @@
"include": "#parameter-clause"
},
{
"match": "\\b(?:throws|rethrows)\\b",
"name": "keyword.control.exception.swift"
"include": "#async-throws"
},
{
"comment": "Swift 3: generic constraints after the parameters and return type",
Expand Down Expand Up @@ -1508,10 +1524,13 @@
"name": "punctuation.definition.parameters.begin.swift"
}
},
"end": "(\\))",
"end": "(\\))(?:\\s*(async)\\b)?",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.end.swift"
},
"2": {
"name": "keyword.control.async.swift"
}
},
"name": "meta.parameter-clause.swift",
Expand Down Expand Up @@ -1796,8 +1815,7 @@
"include": "#parameter-clause"
},
{
"match": "\\b(?:throws|rethrows)\\b",
"name": "keyword.control.exception.swift"
"include": "#async-throws"
},
{
"comment": "Swift 3: generic constraints after the parameters and return type",
Expand Down Expand Up @@ -1857,8 +1875,7 @@
"include": "#function-result"
},
{
"match": "\\b(?:throws|rethrows)\\b",
"name": "keyword.control.exception.swift"
"include": "#async-throws"
},
{
"comment": "Swift 3: generic constraints after the parameters and return type",
Expand Down Expand Up @@ -2520,10 +2537,22 @@
"name": "punctuation.section.tuple.begin.swift"
}
},
"end": "\\)",
"comment": "correctly matching closure expressions is too hard (depends on trailing \"in\") so we just tack on some basics to the end of parenthesized-expression",
"end": "(\\))\\s*((?:\\b(?:async|throws|rethrows)\\s)*)",
"endCaptures": {
"0": {
"1": {
"name": "punctuation.section.tuple.end.swift"
},
"2": {
"patterns": [
{
"match": "\\brethrows\\b",
"name": "invalid.illegal.rethrows-only-allowed-on-function-declarations.swift"
},
{
"include": "#async-throws"
}
]
}
},
"patterns": [
Expand Down Expand Up @@ -2584,6 +2613,17 @@
"match": "(?<!\\.)\\bdefer\\b",
"name": "keyword.control.defer.swift"
},
{
"captures": {
"1": {
"name": "invalid.illegal.try-must-precede-await.swift"
},
"2": {
"name": "keyword.control.await.swift"
}
},
"match": "(?<!\\.)\\b(?:(await\\s+try)|(await)\\b)"
},
{
"match": "(?<!\\.)\\b(?:catch|throws?|rethrows|try)\\b|\\btry[?!]\\B",
"name": "keyword.control.exception.swift"
Expand Down Expand Up @@ -2622,7 +2662,7 @@
},
{
"comment": "matches weak, unowned, unowned(safe), unowned(unsafe)",
"match": "(?<!\\.)\\b(?:weak|unowned)\\b|\\bunowned\\((?:safe|unsafe)\\)",
"match": "(?<!\\.)\\bunowned\\((?:safe|unsafe)\\)|(?<!\\.)\\b(?:weak|unowned)\\b",
"name": "keyword.other.capture-specifier.swift"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,8 @@
}
},
{
"c": "\t",
"t": "source.makefile punctuation.whitespace.comment.leading.makefile",
"c": "\t# \"",
"t": "source.makefile meta.scope.recipe.makefile",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
Expand All @@ -759,25 +759,25 @@
}
},
{
"c": "#",
"t": "source.makefile comment.line.number-sign.makefile punctuation.definition.comment.makefile",
"c": "$$",
"t": "source.makefile meta.scope.recipe.makefile variable.language.makefile",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668"
"dark_plus": "variable.language: #569CD6",
"light_plus": "variable.language: #0000FF",
"dark_vs": "variable.language: #569CD6",
"light_vs": "variable.language: #0000FF",
"hc_black": "variable: #9CDCFE"
}
},
{
"c": " \"$$\" in a shell means to escape makefile's variable substitution.",
"t": "source.makefile comment.line.number-sign.makefile",
"c": "\" in a shell means to escape makefile's variable substitution.",
"t": "source.makefile meta.scope.recipe.makefile",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668"
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
Expand Down Expand Up @@ -968,8 +968,8 @@
}
},
{
"c": "\t",
"t": "source.makefile punctuation.whitespace.comment.leading.makefile",
"c": "\t# And we can see variables are highlited as supposed to be:",
"t": "source.makefile meta.scope.recipe.makefile",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
Expand All @@ -978,28 +978,6 @@
"hc_black": "default: #FFFFFF"
}
},
{
"c": "#",
"t": "source.makefile comment.line.number-sign.makefile punctuation.definition.comment.makefile",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668"
}
},
{
"c": " And we can see variables are highlited as supposed to be:",
"t": "source.makefile comment.line.number-sign.makefile",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668"
}
},
{
"c": "\t",
"t": "source.makefile meta.scope.recipe.makefile",
Expand Down

0 comments on commit 6949fed

Please sign in to comment.