fix circular dependency
This commit is contained in:
parent
0bd0a05f24
commit
eafb3d8ea6
|
@ -5,7 +5,6 @@
|
|||
|
||||
const {RuleNode} = require('./tree/Tree');
|
||||
const {INVALID_INTERVAL} = require('./tree/Tree');
|
||||
const INVALID_ALT_NUMBER = require('./atn/ATN').INVALID_ALT_NUMBER || 0; // TODO: solve cyclic dependency to avoid || 0
|
||||
const Trees = require('./tree/Trees');
|
||||
|
||||
class RuleContext extends RuleNode {
|
||||
|
@ -98,7 +97,10 @@ class RuleContext extends RuleNode {
|
|||
* option contextSuperClass.
|
||||
* to set it.
|
||||
*/
|
||||
getAltNumber() { return INVALID_ALT_NUMBER; }
|
||||
getAltNumber() {
|
||||
// use constant value of ATN.INVALID_ALT_NUMBER to avoid circular dependency
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the outer alternative number for this context node. Default
|
||||
|
|
Loading…
Reference in New Issue