Sublime-WolframLanguage icon indicating copy to clipboard operation
Sublime-WolframLanguage copied to clipboard

Factorial and Factorial2 should not be recognized as "not"

Open shigma opened this issue 6 years ago • 1 comments

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.

shigma avatar Nov 15 '18 17:11 shigma

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]]

batracos avatar Mar 23 '19 16:03 batracos