Skip to content

Commit 04a82ad

Browse files
committed
Add tokenizer unicode for <->, and ->
The WL values doesn't seem to be shown on terminals. We'll accept them, but also accept the real Unicode versions too. This is coordinated with mathicsscript which adds escape sequences for the Unicode arrows The WL arrows you'd get from a cut and paste of WL examples.
1 parent 3447cc4 commit 04a82ad

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

mathics/core/parser/tokeniser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@
9696
("Greater", r" \> "),
9797
("Less", r" \< "),
9898
# https://reference.wolfram.com/language/ref/character/UndirectedEdge.html
99+
# The official Unicode value is below that.
99100
("UndirectedEdge", r" -> | \uf3d4"),
101+
("UndirectedEdge", r" -> | \u2194"),
100102
# https://reference.wolfram.com/language/ref/character/DirectedEdge.html
103+
# The official Unicode value is below that.
101104
("DirectedEdge", r" -> | \uf3d5"),
105+
("DirectedEdge", r" -> | \u2192"),
102106
("Or", r" (\|\|) | \u2228 "),
103107
("And", r" (\&\&) | \u2227 "),
104108
("RepeatedNull", r" \.\.\. "),

0 commit comments

Comments
 (0)