Skip to content

Commit

Permalink
Add some unicode operators in Eiffel (rouge-ruby#2048)
Browse files Browse the repository at this point in the history
  • Loading branch information
imustafin authored May 13, 2024
1 parent 1ab0290 commit 2aac611
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/eiffel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class convert create debug deferred detachable do else elseif end
rule %r/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/, Num::Float

rule %r/:=|<<|>>|\(\||\|\)|->|\.|[{}\[\];(),:?]/, Punctuation::Indicator
rule %r/\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/, Operator
rule %r/\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~≤≥−∀∃¦⟳⟲]/, Operator

rule %r/[A-Z][\dA-Z_]*/, Name::Class
rule %r/[A-Za-z][\dA-Za-z_]*/, Name
Expand Down
5 changes: 5 additions & 0 deletions spec/visual/samples/eiffel
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
-- Unicode operators
1 ≥ -a -- Unicode minus
∀ x: array ¦ ∃ y: array ¦ x = y
⟳ x: array ¦ print (x.out) ⟲

-- Real class example
note
description: "[
Sequences of values, all of the same type or of a conforming one,
Expand Down

0 comments on commit 2aac611

Please sign in to comment.