X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/440424e2bd3babd0bb2c266ba931b3c41ccc0f65..ea5e845aafc7e8525b78c553a1dfd1761de49253:/Cycript.yy.in diff --git a/Cycript.yy.in b/Cycript.yy.in index 7ffc951..047983b 100644 --- a/Cycript.yy.in +++ b/Cycript.yy.in @@ -1,20 +1,20 @@ /* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2012 Jay Freeman (saurik) + * Copyright (C) 2009-2013 Jay Freeman (saurik) */ -/* GNU Lesser General Public License, Version 3 {{{ */ +/* GNU General Public License, Version 3 {{{ */ /* - * Cycript is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. + * Cycript is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation, either version 3 of the License, + * or (at your option) any later version. * - * Cycript is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. + * Cycript is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with Cycript. If not, see . **/ /* }}} */ @@ -81,9 +81,6 @@ typedef struct { CYString *string_; CYThis *this_; CYTrue *true_; - CYTypeModifier *type_; - CYTypedIdentifier *typedIdentifier_; - CYTypedParameter *typedParameter_; CYWord *word_; @begin ObjectiveC @@ -93,6 +90,9 @@ typedef struct { CYMessageParameter *messageParameter_; CYProtocol *protocol_; CYSelectorPart *selector_; + CYTypeModifier *type_; + CYTypedIdentifier *typedIdentifier_; + CYTypedParameter *typedParameter_; @end @begin E4X @@ -557,8 +557,10 @@ LexNoFunction : { if (yychar == yyempty_) driver.no_.Function = true; else if (yychar == token::Function) yychar = token::Function_; } ; -LexNoAtImplementation - : { if (yychar == yyempty_) driver.no_.AtImplementation = true; else if (yychar == token::AtImplementation) yychar = token::AtImplementation_; } +LexNoAtImplementation : +@begin ObjectiveC + { if (yychar == yyempty_) driver.no_.AtImplementation = true; else if (yychar == token::AtImplementation) yychar = token::AtImplementation_; } +@end ; LexSetStatement @@ -1349,7 +1351,7 @@ ProgramBodyOpt SuffixedType : IdentifierOpt { $$ = CYNew CYTypedIdentifier($1); } | "(" LexPushInOff PrefixedType ")" LexPopIn { $$ = $3; } - | SuffixedType "[" NumericLiteral "]" { CYSetLast($1->type_) = CYNew CYTypeArrayOf($3->Value()); $$ = $1; } + | SuffixedType "[" NumericLiteral "]" { CYSetLast($1->type_) = CYNew CYTypeArrayOf($3); $$ = $1; } ; PrefixedType