From 627ed9b43cf9cd4d424142bc18171abcd93e0b5e Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 21 Mar 2026 08:40:41 -0400 Subject: [PATCH] Remove mention of Slot* as operators Right now, this interacts badly with ToString and Boxing in mathics-core When that's addressed, we should reinstate these. --- mathics_scanner/data/named-characters.yml | 24 ++++++++++++----------- test/test_tokeniser.py | 2 ++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/mathics_scanner/data/named-characters.yml b/mathics_scanner/data/named-characters.yml index 2c633e9..1e8dace 100644 --- a/mathics_scanner/data/named-characters.yml +++ b/mathics_scanner/data/named-characters.yml @@ -9756,17 +9756,19 @@ SkeletonIndicator: wl-unicode: "\u2043" wl-unicode-name: HYPHEN BULLET -Slot: - ascii: "#" - has-unicode-inverse: false - is-letter-like: false - operator-name: Slot - -SlotSequence: - ascii: "##" - has-unicode-inverse: false - is-letter-like: false - operator-name: SlotSequence +# FIXME: These are commented out because +# of bugs in ToString in Mathics3-core +# Slot: +# ascii: "#" +# has-unicode-inverse: false +# is-letter-like: false +# operator-name: Slot + +# SlotSequence: +# ascii: "##" +# has-unicode-inverse: false +# is-letter-like: false +# operator-name: SlotSequence SmallCircle: amslatex: '\circ' diff --git a/test/test_tokeniser.py b/test/test_tokeniser.py index fb0c292..d9264ad 100644 --- a/test/test_tokeniser.py +++ b/test/test_tokeniser.py @@ -106,6 +106,7 @@ def test_LITERAL_TOKENS_dict(): "Symbol", "RawColon", "Unequal", # FIXME reinstate this + "SlotSequence", # FIXME reinstate this after ToString is fixes ): continue # In the case of Function, there are several strings representations @@ -128,6 +129,7 @@ def test_LITERAL_TOKENS_dict(): "Semicolon", "Greater", # FIXME reinstate this "Function", # FIXME reinstate this + "Slot", # FIXME reinstate this after ToString is corrected. ): continue for operator in reversed(OPERATOR_TO_STRING[token_name]):