This commit is contained in:
guangwu
2023-05-25 15:58:11 +08:00
committed by GitHub
parent 4a2a8d9e45
commit 76a7a17e57
7 changed files with 25 additions and 25 deletions

View File

@@ -250,11 +250,11 @@ func EqualDoc(spec1, spec2 Spec) bool {
}
func (v *ApiVisitor) getDoc(t TokenStream) []Expr {
return v.getHiddenTokensToLeft(t, api.COMEMNTS, false)
return v.getHiddenTokensToLeft(t, api.COMMENTS, false)
}
func (v *ApiVisitor) getComment(t TokenStream) Expr {
list := v.getHiddenTokensToRight(t, api.COMEMNTS)
list := v.getHiddenTokensToRight(t, api.COMMENTS)
if len(list) == 0 {
return nil
}

View File

@@ -237,4 +237,4 @@ const (
ApiParserLexerLetterOrDigit = 25
)
const COMEMNTS = 88
const COMMENTS = 88

View File

@@ -175,7 +175,7 @@ func isNormal(p *ApiParserParser) bool {
return len(list) > 1
}
// MatchTag returns a Boolean value, which returns true if it does matched, otherwise returns fase
// MatchTag returns a Boolean value, which returns true if it does matched, otherwise returns false
func MatchTag(v string) bool {
return matchRegex(v, tagRegex)
}