Sublime-WolframLanguage
Sublime-WolframLanguage copied to clipboard
Factorial and Factorial2 should not be recognized as "not"
We currently treat ! as a logical operator "not" by the following rule:
match: (!|\|\||&&)
scope: keyword.operator.logical.wolfram
However, ! or !! after an expression should be treated as Factorial and Factorial2 respectively.
True. It seems that bothFactorial and Factorial2 have higher precedence than Not.
In[1154]:=
Hold[a!a]//FullForm
Hold[a!!a]//FullForm
Out[1154]//FullForm= Hold[Times[Factorial[a],a]]
Out[1155]//FullForm= Hold[Times[Factorial2[a],a]]