diff --git a/edit/style.go b/edit/style.go index c9fd70cf..f6a6c0b6 100644 --- a/edit/style.go +++ b/edit/style.go @@ -21,24 +21,24 @@ var styleForType = map[TokenType]string{ Sep: "", } -var styleForSep = map[byte]string{ +var styleForSep = map[string]string{ // unknown : "31", - '#': "36", + "#": "36", - '>': "32", - '<': "32", - '?': "32", // applies to both ?( and ?> - // "?(": "34;1", - '|': "32", + ">": "32", + "<": "32", + "?>": "32", + "|": "32", - '(': "1", - ')': "1", - '[': "1", - ']': "1", - '{': "1", - '}': "1", + "?(": "1", + "(": "1", + ")": "1", + "[": "1", + "]": "1", + "{": "1", + "}": "1", - '&': "1", + "&": "1", } // Styles for semantic coloring. diff --git a/edit/token.go b/edit/token.go index 22eef793..d81271b6 100644 --- a/edit/token.go +++ b/edit/token.go @@ -76,7 +76,7 @@ func produceTokens(n parse.Node, tokenCh chan<- Token) { } case *parse.Sep: tokenType = Sep - moreStyle = styleForSep[n.SourceText()[0]] + moreStyle = styleForSep[n.SourceText()] } tokenCh <- Token{tokenType, n.SourceText(), n, moreStyle} }