Open wanderer opened 8 years ago
or both to raw
?
This naming originates from Mozilla AST:
{ kind: 'identifier', name: 'a' }
{ kind: 'literal', value: 5, raw: '5' }
{ kind: 'literal', value: 'x', raw: '"x"' }
You can try it in https://astexplorer.net by typing: [a, 5, "x"]
Shift-AST makes explicit distinction between literal
kinds, keeps name
and value
, looses raw
"IdentifierExpression"
"LiteralNumericExpression"
"LiteralStringExpression"
Sometimes it is convenient, sometimes not. We should think more. Especially that we have i64
literals ... that we keep as a strings.
so it might be a little bit more consistent if we went from
identifier.id
toidentifier.string
and changeliteral.raw
toliteral.string