You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/tools/goctl/api/parser/g4/gen/api/apiparser_parser9.go

36 lines
775 B
Go

package api
import (
"fmt"
"github.com/zeromicro/antlr"
)
// Part 9
// The apiparser_parser.go file was split into multiple files because it
// was too large and caused a possible memory overflow during goctl installation.
func (p *ApiParserParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
switch ruleIndex {
case 18:
var t *FieldContext = nil
if localctx != nil {
t = localctx.(*FieldContext)
}
return p.Field_Sempred(t, predIndex)
default:
panic("No predicate with index: " + fmt.Sprint(ruleIndex))
}
}
func (p *ApiParserParser) Field_Sempred(localctx antlr.RuleContext, predIndex int) bool {
switch predIndex {
case 0:
return isNormal(p)
default:
panic("No predicate with index: " + fmt.Sprint(predIndex))
}
}