obj()

in backend/src/tools/AgtypeParser.js [241:293]


    obj() {
        let localctx = new ObjContext(this, this._ctx, this.state);
        this.enterRule(localctx, 6, AgtypeParser.RULE_obj);
        var _la = 0; // Token type
        try {
            this.state = 46;
            this._errHandler.sync(this);
            var la_ = this._interp.adaptivePredict(this._input, 3, this._ctx);
            switch (la_) {
                case 1:
                    this.enterOuterAlt(localctx, 1);
                    this.state = 33;
                    this.match(AgtypeParser.T__3);
                    this.state = 34;
                    this.pair();
                    this.state = 39;
                    this._errHandler.sync(this);
                    _la = this._input.LA(1);
                    while (_la === AgtypeParser.T__4) {
                        this.state = 35;
                        this.match(AgtypeParser.T__4);
                        this.state = 36;
                        this.pair();
                        this.state = 41;
                        this._errHandler.sync(this);
                        _la = this._input.LA(1);
                    }
                    this.state = 42;
                    this.match(AgtypeParser.T__5);
                    break;

                case 2:
                    this.enterOuterAlt(localctx, 2);
                    this.state = 44;
                    this.match(AgtypeParser.T__3);
                    this.state = 45;
                    this.match(AgtypeParser.T__5);
                    break;

            }
        } catch (re) {
            if (re instanceof antlr4.error.RecognitionException) {
                localctx.exception = re;
                this._errHandler.reportError(this, re);
                this._errHandler.recover(this, re);
            } else {
                throw re;
            }
        } finally {
            this.exitRule();
        }
        return localctx;
    }