Skip to content

Commit

Permalink
Dart: Distinguish between punctuation and operators (#1838)
Browse files Browse the repository at this point in the history
  • Loading branch information
gareththackeray authored Jun 29, 2022
1 parent d17a6af commit fb4555c
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 fb4555c

Please sign in to comment.