forked from jasder/antlr
JS: ATNConfig can incorrectly change "alt" of 0 to null
When an ATNConfig instance is created with an alt of 0, it is possible for it to be incorrectly changed to null due to its "falsey" nature.
This commit is contained in:
parent
d0fb48c2b8
commit
eb5af71a30
|
@ -50,7 +50,7 @@ function checkParams(params, isCfg) {
|
|||
} else {
|
||||
var props = {};
|
||||
props.state = params.state || null;
|
||||
props.alt = params.alt || null;
|
||||
props.alt = (params.alt === undefined) ? null : params.alt;
|
||||
props.context = params.context || null;
|
||||
props.semanticContext = params.semanticContext || null;
|
||||
if(isCfg) {
|
||||
|
|
Loading…
Reference in New Issue