simon 3 éve
szülő
commit
ca302db8e4
1 módosított fájl, 3 hozzáadás és 3 törlés
  1. 3 3
      parser/parser.go

+ 3 - 3
parser/parser.go

@@ -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) {