Open HeeMyung opened 1 year ago
See example below.
local foo = 'ABCD'
At a very simple level of code like this, "ABCD" is parsed well as a Literal node, but if you look into that node, raw is properly entered, but the value is null.
the result of printing ast is as follows.
{ type: 'Chunk', body: [ { type: 'LocalStatement', variables: [Array], init: [Array] } ], comments: [] } { type: 'StringLiteral', value: null, raw: "'ABCD'" }
This is an effect of encodingMode 'none', you can either use x-user-defined or pseudo-latin1 and strings should get parsed
parser.parse("a = 1",{ encodingMode: "x-user-defined" });
See example below.
local foo = 'ABCD'
At a very simple level of code like this, "ABCD" is parsed well as a Literal node, but if you look into that node, raw is properly entered, but the value is null.
the result of printing ast is as follows.