Feature api root path (#1261)

This commit is contained in:
anqiansong
2021-11-30 18:27:24 +08:00
committed by kevin
parent d828c3f37e
commit f1d70eb6b2
15 changed files with 5381 additions and 5182 deletions

View File

@@ -0,0 +1,35 @@
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))
}
}