fix(goctl)/new parser (#3834)

Co-authored-by: keson <keson@kesondeMacBook-Pro.local>
This commit is contained in:
kesonan
2024-01-11 23:50:53 +08:00
committed by GitHub
parent ffd2a78623
commit 7ba8adfc74
8 changed files with 171 additions and 5 deletions

View File

@@ -385,6 +385,9 @@ func (p *Parser) parsePathExpr() *ast.PathExpr {
}
values = append(values, p.curTok)
if p.peekTokenIs(token.LPAREN, token.Returns, token.AT_DOC, token.AT_HANDLER, token.SEMICOLON, token.RBRACE){
break
}
if p.notExpectPeekTokenGotComment(p.curTokenNode().PeekFirstLeadingComment(), token.COLON, token.IDENT, token.INT) {
return nil
}