export RuleContext directly instead of wrapping it on an anonymous object

This commit is contained in:
Camilo Roca 2020-02-16 21:57:45 +01:00
parent 20cbfc5a0a
commit 6764f53024
4 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@
// group values such as this aggregate. The getters/setters are there to
// satisfy the superclass interface.
var RuleContext = require('./RuleContext').RuleContext;
var RuleContext = require('./RuleContext');
var Tree = require('./tree/Tree');
var INVALID_INTERVAL = Tree.INVALID_INTERVAL;
var TerminalNode = Tree.TerminalNode;
@ -222,4 +222,4 @@ function InterpreterRuleContext(parent, invokingStateNumber, ruleIndex) {
InterpreterRuleContext.prototype = Object.create(ParserRuleContext.prototype);
InterpreterRuleContext.prototype.constructor = InterpreterRuleContext;
exports.ParserRuleContext = ParserRuleContext;
exports.ParserRuleContext = ParserRuleContext;

View File

@ -5,7 +5,7 @@
*/
///
var RuleContext = require('./RuleContext').RuleContext;
var RuleContext = require('./RuleContext');
var Hash = require('./Utils').Hash;
var Map = require('./Utils').Map;

View File

@ -118,7 +118,7 @@ RuleContext.prototype.accept = function(visitor) {
};
//need to manage circular dependencies, so export now
exports.RuleContext = RuleContext;
module.exports = RuleContext;
var Trees = require('./tree/Trees');

View File

@ -246,7 +246,7 @@ var DFAState = require('./../dfa/DFAState').DFAState;
var PredPrediction = require('./../dfa/DFAState').PredPrediction;
var ATNSimulator = require('./ATNSimulator').ATNSimulator;
var PredictionMode = require('./PredictionMode').PredictionMode;
var RuleContext = require('./../RuleContext').RuleContext;
var RuleContext = require('./../RuleContext');
var ParserRuleContext = require('./../ParserRuleContext').ParserRuleContext;
var SemanticContext = require('./SemanticContext').SemanticContext;
var StarLoopEntryState = require('./ATNState').StarLoopEntryState;