From fa051422925e7e0c01e94d5c6e521419895b2275 Mon Sep 17 00:00:00 2001 From: fpirsch Date: Fri, 26 Oct 2012 23:17:54 +0300 Subject: [PATCH] Update examples/javascript.pegjs Changed "arguments" to "args" in several places to avoid shadowing "arguments", which is not allowed by Google Clusure Compiler. --- examples/javascript.pegjs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/javascript.pegjs b/examples/javascript.pegjs index a9bc977..a5f3004 100644 --- a/examples/javascript.pegjs +++ b/examples/javascript.pegjs @@ -562,11 +562,11 @@ MemberExpression = base:( PrimaryExpression / FunctionExpression - / NewToken __ constructor:MemberExpression __ arguments:Arguments { + / NewToken __ constructor:MemberExpression __ args:Arguments { return { type: "NewOperator", constructor: constructor, - arguments: arguments + arguments: args }; } ) @@ -597,19 +597,19 @@ NewExpression CallExpression = base:( - name:MemberExpression __ arguments:Arguments { + name:MemberExpression __ args:Arguments { return { type: "FunctionCall", name: name, - arguments: arguments + arguments: args }; } ) argumentsOrAccessors:( - __ arguments:Arguments { + __ args:Arguments { return { type: "FunctionCallArguments", - arguments: arguments + arguments: args }; } / __ "[" __ name:Expression __ "]" { @@ -652,8 +652,8 @@ CallExpression } Arguments - = "(" __ arguments:ArgumentList? __ ")" { - return arguments !== "" ? arguments : []; + = "(" __ args:ArgumentList? __ ")" { + return args !== "" ? args : []; } ArgumentList