In JSON, -1 is parsed as a single number token. But in ECMAScript, it is parsed as a UnaryExpression consisting of - and a NumericLiteral. ShallowestContainedJSONValue should therefore characterize numbers as |UnaryExpression| rather than |NumericLiteral|, so that InternalizeJSONProperty defining a "source" property using the source text matched by parseNode correctly sets the value to a string containing any negation prefix.
In JSON,
-1
is parsed as a single number token. But in ECMAScript, it is parsed as a UnaryExpression consisting of-
and a NumericLiteral. ShallowestContainedJSONValue should therefore characterize numbers as |UnaryExpression| rather than |NumericLiteral|, so that InternalizeJSONProperty defining a "source" property using the source text matched by parseNode correctly sets the value to a string containing any negation prefix.