func()

in shardingsphere-operator/pkg/distsql/visitor_parser/sharding/rdlstatement_parser.go [641:714]


func (p *RDLStatementParser) CreateShardingTableRule() (localctx ICreateShardingTableRuleContext) {
	localctx = NewCreateShardingTableRuleContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 0, RDLStatementParserRULE_createShardingTableRule)
	var _la int

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(110)
		p.Match(RDLStatementParserCREATE)
	}
	{
		p.SetState(111)
		p.Match(RDLStatementParserSHARDING)
	}
	{
		p.SetState(112)
		p.Match(RDLStatementParserTABLE)
	}
	{
		p.SetState(113)
		p.Match(RDLStatementParserRULE)
	}
	p.SetState(115)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	if _la == RDLStatementParserIF {
		{
			p.SetState(114)
			p.IfNotExists()
		}

	}
	{
		p.SetState(117)
		p.ShardingTableRuleDefinition()
	}
	p.SetState(122)
	p.GetErrorHandler().Sync(p)
	_la = p.GetTokenStream().LA(1)

	for _la == RDLStatementParserCOMMA_ {
		{
			p.SetState(118)
			p.Match(RDLStatementParserCOMMA_)
		}
		{
			p.SetState(119)
			p.ShardingTableRuleDefinition()
		}

		p.SetState(124)
		p.GetErrorHandler().Sync(p)
		_la = p.GetTokenStream().LA(1)
	}

	return localctx
}