* fix #1318

* fix #1318

* remove never used code

* fix unit tes

Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
anqiansong
2021-12-13 22:55:11 +08:00
committed by GitHub
parent 914692cc82
commit 1b14de2ff9
18 changed files with 1103 additions and 660 deletions

View File

@@ -10,14 +10,14 @@ import (
// 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)
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))
@@ -27,9 +27,11 @@ func (p *ApiParserParser) Sempred(localctx antlr.RuleContext, ruleIndex, predInd
func (p *ApiParserParser) Field_Sempred(localctx antlr.RuleContext, predIndex int) bool {
switch predIndex {
case 0:
return isNormal(p)
return isNormal(p)
default:
panic("No predicate with index: " + fmt.Sprint(predIndex))
}
}