diff --git a/Go/Embeddings/Go (Embedded Backtick String).sublime-syntax b/Go/Embeddings/Go (Embedded Backtick String).sublime-syntax index 97bd49073e..142fa11b8d 100644 --- a/Go/Embeddings/Go (Embedded Backtick String).sublime-syntax +++ b/Go/Embeddings/Go (Embedded Backtick String).sublime-syntax @@ -17,7 +17,7 @@ contexts: - match: '{{newline}}' scope: comment.line.double-slash.go set: - - match-any + - match-any-root - consume-comments-at-beginning-of-line consume-comments-at-beginning-of-line: @@ -26,21 +26,6 @@ contexts: - match: ^(?!\s*/[/*]) pop: true - match-any: - - meta_prepend: true + match-any-root: - include: pop-on-eol - - match-parens: - - meta_prepend: true - - match: (?=\)) - pop: true - - match-brackets: - - meta_prepend: true - - match: (?=\]) - pop: true - - match-braces: - - meta_prepend: true - - match: (?=\}) - pop: true + - include: match-any diff --git a/Go/Go.sublime-syntax b/Go/Go.sublime-syntax index a1433867f1..80707c3444 100644 --- a/Go/Go.sublime-syntax +++ b/Go/Go.sublime-syntax @@ -916,6 +916,8 @@ contexts: pop: true - match: '{{predeclared_type}}' scope: support.type.go + - match: (?=;) + pop: 1 - include: match-any match-keyword-chan: diff --git a/Go/tests/syntax_test_go.go b/Go/tests/syntax_test_go.go index a2f7e23645..b0ba238d7f 100644 --- a/Go/tests/syntax_test_go.go +++ b/Go/tests/syntax_test_go.go @@ -5644,6 +5644,13 @@ func main() { // plan9, windows... fmt.Printf("%s.\n", os) } + switch os { + case no_colon_here_while_user_is_typing + ; a := b +// ^ punctuation.terminator +// ^ - punctuation.separator.case-statement +// ^^ keyword.operator.assignment + } } func do(i interface{}) { @@ -5847,3 +5854,13 @@ func lang_embedding() { // ^^^^^^^^^^^ meta.interpolation.go // ^ meta.string.go string.quoted.backtick.go punctuation.definition.string.end.go } + +// language=sql +some_func_call( + args_on_next_line, ` + SELECT min(a) + FROM b + WHERE c = @p1`, "some value", + // ^^^^^^^^^^^^^^ meta.string.go meta.embedded.go source.sql.embedded.go +) +// <- punctuation.section.parens.end.go - invalid