Skip to content

Commit e73e53b

Browse files
committed
Add DirectedEdge
1 parent f3682e5 commit e73e53b

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

mathics/core/parser/operators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133

134134
nonassoc_binary_ops = {
135135
'UndirectedEdge': 120,
136+
'DirectedEdge': 128,
136137
'PatternTest': 680,
137138
}
138139

mathics/core/parser/tokeniser.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
('RawLeftParenthesis', r' \( '),
5151
('RawRightParenthesis', r' \) '),
5252
('RawLeftAssociation', r' \<\| '),
53-
('RawRightAssociation', r' \|\> '),
54-
53+
('RawRightAssociation', r' \|\> '),
54+
5555
('RawComma', r' \, '),
5656

5757
('Span', r' \;\; '),
@@ -111,6 +111,8 @@
111111
('Greater', r' \> '),
112112
('Less', r' \< '),
113113

114+
('DirectedEdge', r' -> | \uf3d5'),
115+
114116
('Or', r' (\|\|) | \u2228 '),
115117
('And', r' (\&\&) | \u2227 '),
116118

@@ -142,7 +144,7 @@
142144
('Minus', r' \-|\u2212 '),
143145
('Plus', r' \+ '),
144146
('RawBackslash', r' \\ '),
145-
147+
146148
('Factorial2', r' \!\! '),
147149
('Factorial', r' \! '),
148150
('Function', r' \& | \uF4A1 '),

0 commit comments

Comments
 (0)