|
|
@@ -399,7 +399,7 @@ func (p *Parser) parseExpression(precedence int) ast.Expression {
|
|
|
}
|
|
|
func (p *Parser) parseExpressionList(end token.TypeToken) []ast.Expression {
|
|
|
defer untrace(trace("parseExpressionList"))
|
|
|
- list := []ast.Expression{}
|
|
|
+ list := make([]ast.Expression, 0)
|
|
|
|
|
|
if p.peekTokenIs(end) {
|
|
|
p.nextToken()
|
|
|
@@ -463,7 +463,7 @@ func (p *Parser) curPrecedence() int {
|
|
|
}
|
|
|
|
|
|
func (p *Parser) ParseFunctionParameters() []*ast.Identifier {
|
|
|
- identifiers := []*ast.Identifier{}
|
|
|
+ identifiers := make([]*ast.Identifier, 0)
|
|
|
|
|
|
if p.peekTokenIs(token.RPAREN) {
|
|
|
p.nextToken()
|
|
|
@@ -490,7 +490,7 @@ func (p *Parser) ParseFunctionParameters() []*ast.Identifier {
|
|
|
}
|
|
|
|
|
|
func (p *Parser) parseCallArguments() []ast.Expression {
|
|
|
- args := []ast.Expression{}
|
|
|
+ args := make([]ast.Expression, 0)
|
|
|
|
|
|
// the case (), then null args
|
|
|
if p.peekTokenIs(token.RPAREN) {
|