From f149e19228ac4ca5f30f56b27f2fef65bbf3aa96 Mon Sep 17 00:00:00 2001 From: Nelo Mitranim Date: Tue, 29 Mar 2022 12:36:11 +0300 Subject: [PATCH] [Go] misc tweaks from code review Co-authored-by: deathaxe --- Go/Go.sublime-syntax | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Go/Go.sublime-syntax b/Go/Go.sublime-syntax index a42249df8dc..ae72c14da18 100644 --- a/Go/Go.sublime-syntax +++ b/Go/Go.sublime-syntax @@ -471,8 +471,7 @@ contexts: pop-type-assertion: - include: pop-on-paren-end - - match: (?=\S) - push: pop-type + - include: match-type match-parens: - match: \( @@ -989,8 +988,7 @@ contexts: - include: pop-before-terminator - match: (?=\() set: pop-func-parameter-list - - match: (?=\S) - set: pop-type + - include: pop-type # https://golang.org/ref/spec#Function_types # @@ -1063,8 +1061,7 @@ contexts: - include: match-comma - include: match-ellipsis - include: match-keywords - - match: (?=\S) - push: pop-type + - include: match-type # At the time of writing, this is the only part of Go that uses "untyped" # syntax for parameters, similar to function definitions in dynamic languages @@ -1173,7 +1170,7 @@ contexts: match-type: - match: (?=\S) - push: pop-type + push: [pop-after-type, pop-type-single] pop-type: - match: (?=\S)