From ed493ddd48f155ad98acceed8c291973471d31ed Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 18 Nov 2015 00:31:06 -0800 Subject: [PATCH] Some old syntax to parse Swift's named parameters. --- Cycript.yy.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Cycript.yy.in b/Cycript.yy.in index 298d16f..efa6aa3 100644 --- a/Cycript.yy.in +++ b/Cycript.yy.in @@ -625,7 +625,7 @@ Word | "continue" NewLineOpt { $$ = $1; } | "debugger" { $$ = $1; } | "default" { $$ = $1; } - | "delete" { $$ = $1; } + | "delete" LexSetRegExp { $$ = $1; } | "do" { $$ = $1; } | "else" { $$ = $1; } | "enum" { $$ = $1; } @@ -644,7 +644,7 @@ Word // XXX: as it currently is not an Identifier | "let" { $$ = $1; } - | "new" { $$ = $1; } + | "new" LexSetRegExp { $$ = $1; } | "null" { $$ = $1; } | "return" NewLineOpt { $$ = $1; } | "super" { $$ = $1; } @@ -653,9 +653,9 @@ Word | "throw" NewLineOpt { $$ = $1; } | "true" { $$ = $1; } | "try" { $$ = $1; } - | "typeof" { $$ = $1; } + | "typeof" LexSetRegExp { $$ = $1; } | "var" { $$ = $1; } - | "void" { $$ = $1; } + | "void" LexSetRegExp { $$ = $1; } | "while" { $$ = $1; } | "with" { $$ = $1; } ; @@ -925,6 +925,7 @@ ArgumentList_ ArgumentList : AssignmentExpression ArgumentList_ { $$ = CYNew CYArgument(NULL, $1, $2); } + | LexSetRegExp Word ":" AssignmentExpression ArgumentList_ { $$ = CYNew CYArgument($2, $4, $5); } ; ArgumentListOpt -- 2.47.2