in src/mongo/grammar/mongoParser.ts [202:264]
public command(): CommandContext {
const _localctx: CommandContext = new CommandContext(this._ctx, this.state);
this.enterRule(_localctx, 4, mongoParser.RULE_command);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
this.state = 45;
this.match(mongoParser.DB);
this.state = 48;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 2, this._ctx)) {
case 1:
{
this.state = 46;
this.match(mongoParser.DOT);
this.state = 47;
this.collection();
}
break;
}
this.state = 52;
this._errHandler.sync(this);
_la = this._input.LA(1);
do {
{
{
this.state = 50;
this.match(mongoParser.DOT);
this.state = 51;
this.functionCall();
}
}
this.state = 54;
this._errHandler.sync(this);
_la = this._input.LA(1);
} while (_la === mongoParser.DOT);
this.state = 57;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 4, this._ctx)) {
case 1:
{
this.state = 56;
this.match(mongoParser.SEMICOLON);
}
break;
}
}
}
catch (re) {
if (re instanceof RecognitionException) {
_localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
}
finally {
this.exitRule();
}
return _localctx;
}