From c48cb96d05ccc9f0320491251c3bd38a3dd84e41 Mon Sep 17 00:00:00 2001 From: Jeff Hykin Date: Thu, 11 Jul 2024 13:02:50 -0500 Subject: [PATCH] alternation is behaving weird so wrap some things for sanity sake --- main/main.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main/main.rb b/main/main.rb index 5a934ce5..599fb79b 100644 --- a/main/main.rb +++ b/main/main.rb @@ -70,11 +70,11 @@ ) assignment_operators = oneOf([ Pattern.new( - match: /%=|\+=|-=|\*=|(?>=|\|=/, + match: /(?:&=|\^=|<<=|>>=|\|=)/, tag_as: "keyword.operator.assignment.compound.bitwise" ), assignment_operator, @@ -1708,24 +1708,24 @@ def generateBlockFinder( name:"", tag_as:"", start_pattern:nil, needs_semicolon: tag_as: "keyword.operator.increment" ), Pattern.new( - match: /<<|>>/, + match: /(?:<<|>>)/, tag_as: "keyword.operator.bitwise.shift" ), Pattern.new( - match: /!=|<=|>=|==|<|>/, + match: /(?:!=|<=|>=|==|<|>)/, tag_as: "keyword.operator.comparison" ), Pattern.new( - match: /&&|!|\|\|/, + match: /(?:&&|!|\|\|)/, tag_as: "keyword.operator.logical" ), Pattern.new( - match: /&|\||\^|~/, + match: /(?:&|\||\^|~)/, tag_as: "keyword.operator.bitwise" ), assignment_operators, Pattern.new( - match: /%|\*|\/|-|\+/, + match: /(?:%|\*|\/|-|\+)/, tag_as: "keyword.operator.arithmetic" ), :ternary_operator,