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
Mike Gerwitz 2017-08-30 00:20:54 -04:00
parent 59daf7a5b5
commit fe80b398b5
Signed by: mikegerwitz
GPG Key ID: 8C917B7F5DC51BA2
1 changed files with 1 additions and 1 deletions

View File

@ -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
}; };