MCPcopy
hub / github.com/antlr/antlr4 / conditionalExpression

Method conditionalExpression

runtime/Python3/tests/parser/cparser.py:2810–2837  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2808
2809
2810 def conditionalExpression(self):
2811
2812 localctx = CParser.ConditionalExpressionContext(self, self._ctx, self.state)
2813 self.enterRule(localctx, 38, self.RULE_conditionalExpression)
2814 try:
2815 self.enterOuterAlt(localctx, 1)
2816 self.state = 477
2817 self.logicalOrExpression(0)
2818 self.state = 483
2819 la_ = self._interp.adaptivePredict(self._input,27,self._ctx)
2820 if la_ == 1:
2821 self.state = 478
2822 self.match(CParser.Question)
2823 self.state = 479
2824 self.expression(0)
2825 self.state = 480
2826 self.match(CParser.Colon)
2827 self.state = 481
2828 self.conditionalExpression()
2829
2830
2831 except RecognitionException as re:
2832 localctx.exception = re
2833 self._errHandler.reportError(self, re)
2834 self._errHandler.recover(self, re)
2835 finally:
2836 self.exitRule()
2837 return localctx
2838
2839 class AssignmentExpressionContext(ParserRuleContext):
2840

Callers 2

assignmentExpressionMethod · 0.95
constantExpressionMethod · 0.95

Calls 9

logicalOrExpressionMethod · 0.95
expressionMethod · 0.95
reportErrorMethod · 0.65
recoverMethod · 0.65
enterRuleMethod · 0.45
enterOuterAltMethod · 0.45
adaptivePredictMethod · 0.45
matchMethod · 0.45
exitRuleMethod · 0.45

Tested by

no test coverage detected