Skip to content

Commit

Permalink
1、修复外网的崩溃
Browse files Browse the repository at this point in the history
  • Loading branch information
yinfei8 committed Nov 4, 2024
1 parent 1379803 commit 15c9fac
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ func parserClassState(l *annotatelexer.AnnotateLexer) annotateast.AnnotateState
for {
// 解析多个父类
oneParentName := l.NextFieldName()
classState.ParentNameList = append(classState.ParentNameList, oneParentName)
classState.ParentLocList = append(classState.ParentLocList, l.GetNowLoc())
// 如果自己的类型与父类型一样,会导致递归出错,忽略该父类型。
if oneParentName != classState.Name {
classState.ParentNameList = append(classState.ParentNameList, oneParentName)
classState.ParentLocList = append(classState.ParentLocList, l.GetNowLoc())
}

if l.LookAheadKind() == annotatelexer.ATokenSepComma {
// 是逗号, 表示有多个父类
Expand Down

0 comments on commit 15c9fac

Please sign in to comment.