From 8a2eb1bec421d66eafe982661ea1d282505fdfe1 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 11 Oct 2014 04:14:12 -0700 Subject: [PATCH] @encode syntax doesn't require Objective-C support. --- Cycript.l.in | 5 ++++- Cycript.yy.in | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cycript.l.in b/Cycript.l.in index cbe4fe5..c5fa6de 100644 --- a/Cycript.l.in +++ b/Cycript.l.in @@ -267,8 +267,11 @@ XMLName {XMLNameStart}{XMLNamePart}* "signed" L C I(identifier, Identifier("signed"), tk::Signed, hi::Type); @end -@begin ObjectiveC +@begin C "@encode" L C F(tk::AtEncode, hi::Meta); +@end + +@begin ObjectiveC "@end" L C F(tk::AtEnd, hi::Meta); "@implementation" L C F(yyextra->no_.AtImplementation ? tk::AtImplementation_ : tk::AtImplementation, hi::Meta); "@import" L C F(tk::AtImport, hi::Special); diff --git a/Cycript.yy.in b/Cycript.yy.in index 0f16b6e..9aea79d 100644 --- a/Cycript.yy.in +++ b/Cycript.yy.in @@ -242,11 +242,14 @@ int cylex(YYSTYPE *, cy::location *, void *); %token Signed "signed" @end +@begin C +%token AtEncode "@encode" +@end + @begin ObjectiveC %token AtImplementation "@implementation" %token AtImplementation_ ";@implementation" %token AtImport "@import" -%token AtEncode "@encode" %token AtEnd "@end" %token AtSelector "@selector" %token Yes "YES" -- 2.45.2