Skip to content

Commit

Permalink
Dart: Distinguish between punctuation and operators
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Thackeray committed Jun 29, 2022
1 parent 303943c commit bf4cdf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rouge/lexers/dart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class Dart < RegexLexer

rule %r/#{id}:/, Name::Label
rule %r/\$?#{id}/, Name
rule %r/[~^*!%&\[\](){}<>\|+=:;,.\/?-]/, Operator
rule %r/[~^*!%&\|+=:\/?-]/, Operator
rule %r/[\[\](){}<>\.,;]/, Punctuation
rule %r/\d*\.\d+([eE]\-?\d+)?/, Num::Float
rule %r/0x[\da-fA-F]+/, Num::Hex
rule %r/\d+L?/, Num::Integer
Expand Down

0 comments on commit bf4cdf5

Please sign in to comment.