Skip to content

Commit

Permalink
alternation is behaving weird so wrap some things for sanity sake
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-hykin committed Jul 11, 2024
1 parent ec459bb commit c48cb96
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions main/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
)
assignment_operators = oneOf([
Pattern.new(
match: /%=|\+=|-=|\*=|(?<!\()\/=/,
match: /(?:%=|\+=|-=|\*=|(?<!\()\/=)/,
tag_as: "keyword.operator.assignment.compound"
),
Pattern.new(
match: /&=|\^=|<<=|>>=|\|=/,
match: /(?:&=|\^=|<<=|>>=|\|=)/,
tag_as: "keyword.operator.assignment.compound.bitwise"
),
assignment_operator,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c48cb96

Please sign in to comment.