prebirth: Correct token value parsing
Empty string was not matching, which was causing its value to be '""', which expanded (in JS) into the compiled string '""""'. Oops. * build-aux/bootstrap/prebirth.js (Parser#_token): Distinguish empty values from non-matches.master
parent
59daf7a5b5
commit
fe80b398b5
|
@ -268,7 +268,7 @@ class Parser
|
||||||
const token = {
|
const token = {
|
||||||
type: type,
|
type: type,
|
||||||
lexeme: lexeme,
|
lexeme: lexeme,
|
||||||
value: value || lexeme,
|
value: ( value === undefined ) ? lexeme : value,
|
||||||
pos: pos
|
pos: pos
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue