in drivers/nodejs/src/antlr4/AgtypeParser.ts [181:271]
public value (): ValueContext {
let _localctx: ValueContext = new ValueContext(this._ctx, this.state)
this.enterRule(_localctx, 4, AgtypeParser.RULE_value)
try {
this.state = 31
this._errHandler.sync(this)
switch (this._input.LA(1)) {
case AgtypeParser.STRING:
_localctx = new StringValueContext(_localctx)
this.enterOuterAlt(_localctx, 1)
{
this.state = 23
this.match(AgtypeParser.STRING)
}
break
case AgtypeParser.INTEGER:
_localctx = new IntegerValueContext(_localctx)
this.enterOuterAlt(_localctx, 2)
{
this.state = 24
this.match(AgtypeParser.INTEGER)
}
break
case AgtypeParser.T__10:
case AgtypeParser.T__11:
case AgtypeParser.T__12:
case AgtypeParser.RegularFloat:
case AgtypeParser.ExponentFloat:
_localctx = new FloatValueContext(_localctx)
this.enterOuterAlt(_localctx, 3)
{
this.state = 25
this.floatLiteral()
}
break
case AgtypeParser.T__0:
_localctx = new TrueBooleanContext(_localctx)
this.enterOuterAlt(_localctx, 4)
{
this.state = 26
this.match(AgtypeParser.T__0)
}
break
case AgtypeParser.T__1:
_localctx = new FalseBooleanContext(_localctx)
this.enterOuterAlt(_localctx, 5)
{
this.state = 27
this.match(AgtypeParser.T__1)
}
break
case AgtypeParser.T__2:
_localctx = new NullValueContext(_localctx)
this.enterOuterAlt(_localctx, 6)
{
this.state = 28
this.match(AgtypeParser.T__2)
}
break
case AgtypeParser.T__3:
_localctx = new ObjectValueContext(_localctx)
this.enterOuterAlt(_localctx, 7)
{
this.state = 29
this.obj()
}
break
case AgtypeParser.T__7:
_localctx = new ArrayValueContext(_localctx)
this.enterOuterAlt(_localctx, 8)
{
this.state = 30
this.array()
}
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
}