-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
error messagesBetter, more actionable diagnosticsBetter, more actionable diagnosticsinvalidThis doesn't seem rightThis doesn't seem rightparser
Description
Per this discussion, there's an ambiguity in an expression like 1 +ᵃx — which could mean either 1 +ᵃ x or 1 + ᵃx. As of this writing, the manual says (emphasis mine)
A space is required between an operator that ends with a subscript/superscript letter and a subsequent variable name. For example, if
+ᵃis an operator, then+ᵃxmust be written as+ᵃ xto distinguish it from+ ᵃxwhereᵃxis the variable name.
Those emphasized words would suggest that a missing space would raise an error, just as 1.+x does — but that is not the case. The current behavior in both the native Julia parser and in JuliaSyntax is to parse +ᵃx as +ᵃ x. @stevengj suggests it should be an error.
Metadata
Metadata
Assignees
Labels
error messagesBetter, more actionable diagnosticsBetter, more actionable diagnosticsinvalidThis doesn't seem rightThis doesn't seem rightparser