MCPcopy
hub / github.com/uber/aresdb / primaryExpression

Method primaryExpression

query/sql/antlrgen/sqlbase_parser.go:7494–8178  ·  view source on GitHub ↗
(_p int)

Source from the content-addressed store, hash-verified

7492}
7493
7494func (p *SqlBaseParser) primaryExpression(_p int) (localctx IPrimaryExpressionContext) {
7495 var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
7496 _parentState := p.GetState()
7497 localctx = NewPrimaryExpressionContext(p, p.GetParserRuleContext(), _parentState)
7498 var _prevctx IPrimaryExpressionContext = localctx
7499 var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
7500 _startState := 54
7501 p.EnterRecursionRule(localctx, 54, SqlBaseParserRULE_primaryExpression, _p)
7502 var _la int
7503
7504 defer func() {
7505 p.UnrollRecursionContexts(_parentctx)
7506 }()
7507
7508 defer func() {
7509 if err := recover(); err != nil {
7510 if v, ok := err.(antlr.RecognitionException); ok {
7511 localctx.SetException(v)
7512 p.GetErrorHandler().ReportError(p, v)
7513 p.GetErrorHandler().Recover(p, v)
7514 } else {
7515 panic(err)
7516 }
7517 }
7518 }()
7519
7520 var _alt int
7521
7522 p.EnterOuterAlt(localctx, 1)
7523 p.SetState(582)
7524 p.GetErrorHandler().Sync(p)
7525 switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 74, p.GetParserRuleContext()) {
7526 case 1:
7527 localctx = NewNullLiteralContext(p, localctx)
7528 p.SetParserRuleContext(localctx)
7529 _prevctx = localctx
7530
7531 {
7532 p.SetState(450)
7533 p.Match(SqlBaseParserNULL)
7534 }
7535
7536 case 2:
7537 localctx = NewIntervalLiteralContext(p, localctx)
7538 p.SetParserRuleContext(localctx)
7539 _prevctx = localctx
7540 {
7541 p.SetState(451)
7542 p.Interval()
7543 }
7544
7545 case 3:
7546 localctx = NewTypeConstructorContext(p, localctx)
7547 p.SetParserRuleContext(localctx)
7548 _prevctx = localctx
7549 {
7550 p.SetState(452)
7551 p.Identifier()

Callers 2

valueExpressionMethod · 0.95
PrimaryExpressionMethod · 0.95

Calls 15

IntervalMethod · 0.95
IdentifierMethod · 0.95
Sql_stringMethod · 0.95
NumberMethod · 0.95
BooleanValueMethod · 0.95
ExpressionMethod · 0.95
QualifiedNameMethod · 0.95
FilterMethod · 0.95
SetQuantifierMethod · 0.95
SortItemMethod · 0.95
QueryMethod · 0.95
valueExpressionMethod · 0.95

Tested by

no test coverage detected