chore: make cpu usage more smooth (#3842)

This commit is contained in:
Kevin Wan
2024-01-13 19:36:25 +08:00
committed by GitHub
parent 7ba8adfc74
commit 81d72b5010
5 changed files with 11 additions and 6 deletions

View File

@@ -385,7 +385,7 @@ 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){
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) {