public propertyValue()

in src/mongo/grammar/mongoParser.ts [668:724]


    public propertyValue(): PropertyValueContext {
        const _localctx: PropertyValueContext = new PropertyValueContext(this._ctx, this.state);
        this.enterRule(_localctx, 26, mongoParser.RULE_propertyValue);
        try {
            this.state = 129;
            this._errHandler.sync(this);
            switch (this._input.LA(1)) {
                case mongoParser.RegexLiteral:
                case mongoParser.StringLiteral:
                case mongoParser.NullLiteral:
                case mongoParser.BooleanLiteral:
                case mongoParser.NumericLiteral:
                    this.enterOuterAlt(_localctx, 1);
                    {
                        this.state = 125;
                        this.literal();
                    }
                    break;
                case mongoParser.T__3:
                    this.enterOuterAlt(_localctx, 2);
                    {
                        this.state = 126;
                        this.objectLiteral();
                    }
                    break;
                case mongoParser.T__5:
                    this.enterOuterAlt(_localctx, 3);
                    {
                        this.state = 127;
                        this.arrayLiteral();
                    }
                    break;
                case mongoParser.IDENTIFIER:
                    this.enterOuterAlt(_localctx, 4);
                    {
                        this.state = 128;
                        this.functionCall();
                    }
                    break;
                default:
                    throw new NoViableAltException(this);
            }
        }
        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;
    }