git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1243b55
)
added instanceof operator
author
kramm
<kramm>
Fri, 2 Jan 2009 19:49:13 +0000
(19:49 +0000)
committer
kramm
<kramm>
Fri, 2 Jan 2009 19:49:13 +0000
(19:49 +0000)
lib/as3/parser.y
patch
|
blob
|
history
diff --git
a/lib/as3/parser.y
b/lib/as3/parser.y
index
6808ae8
..
402e2d9
100644
(file)
--- a/
lib/as3/parser.y
+++ b/
lib/as3/parser.y
@@
-87,6
+87,7
@@
%token<token> KW_SET "set"
%token<token> KW_VOID "void"
%token<token> KW_STATIC
%token<token> KW_SET "set"
%token<token> KW_VOID "void"
%token<token> KW_STATIC
+%token<token> KW_INSTANCEOF "instanceof"
%token<token> KW_IMPORT "import"
%token<token> KW_RETURN "return"
%token<token> KW_TYPEOF "typeof"
%token<token> KW_IMPORT "import"
%token<token> KW_RETURN "return"
%token<token> KW_TYPEOF "typeof"
@@
-1891,6
+1892,12
@@
E : E "as" E {char use_astype=0; // flash player's astype works differently than
}
}
}
}
+E : E "instanceof" E
+ {$$.c = code_append($1.c, $3.c);
+ $$.c = abc_instanceof($$.c);
+ $$.t = TYPE_BOOLEAN;
+ }
+
E : E "is" E {$$.c = code_append($1.c, $3.c);
$$.c = abc_istypelate($$.c);
$$.t = TYPE_BOOLEAN;
E : E "is" E {$$.c = code_append($1.c, $3.c);
$$.c = abc_istypelate($$.c);
$$.t = TYPE_BOOLEAN;