rsmenon / pygments-mathematica

Mathematica/Wolfram Language lexer and highlighter for Pygments
MIT License
59 stars 8 forks source link

Tilde is an operator, but is in `UNICODE_SYSTEM_UNDEFINED_SYMBOLS` #15

Closed rocky closed 3 years ago

rocky commented 3 years ago

See https://reference.wolfram.com/language/ref/Infix.html

It should be removed from https://github.com/rsmenon/pygments-mathematica/blob/master/mathematica/builtins.py#L5692 and added to UNICODE_OPERATORS.

rsmenon commented 3 years ago

The ~ operator is Infix, whereas the symbol Tilde has no built in meaning per the documentation. It is confusing, but the two are not the same.

As such, classifying it as UNICODE_SYSTEM_UNDEFINED_SYMBOLS (for \[Tilde]) or SYSTEM_SYMBOL (for Tilde) is appropriate.