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 (from parent 1:
69de889
)
added '|=' implementation
author
kramm
<kramm>
Tue, 6 Jan 2009 21:34:44 +0000
(21:34 +0000)
committer
kramm
<kramm>
Tue, 6 Jan 2009 21:34:44 +0000
(21:34 +0000)
lib/as3/parser.y
patch
|
blob
|
history
diff --git
a/lib/as3/parser.y
b/lib/as3/parser.y
index
d2188ef
..
1558aa4
100644
(file)
--- a/
lib/as3/parser.y
+++ b/
lib/as3/parser.y
@@
-137,6
+137,7
@@
%token<token> T_NEE "!=="
%token<token> T_LE "<="
%token<token> T_GE ">="
%token<token> T_NEE "!=="
%token<token> T_LE "<="
%token<token> T_GE ">="
+%token<token> T_ORBY "|="
%token<token> T_DIVBY "/="
%token<token> T_MODBY "%="
%token<token> T_MULBY "*="
%token<token> T_DIVBY "/="
%token<token> T_MODBY "%="
%token<token> T_MULBY "*="
@@
-213,7
+214,7
@@
%right '?' ':'
%left "||"
%left "&&"
%right '?' ':'
%left "||"
%left "&&"
-%nonassoc '|'
+%left '|'
%nonassoc '^'
%nonassoc '&'
%nonassoc "==" "!=" "===" "!=="
%nonassoc '^'
%nonassoc '&'
%nonassoc "==" "!=" "===" "!=="
@@
-2399,6
+2400,12
@@
E : E "/=" E {
$$.c = toreadwrite($1.c, c, 0, 0);
$$.t = $1.t;
}
$$.c = toreadwrite($1.c, c, 0, 0);
$$.t = $1.t;
}
+E : E "|=" E {
+ code_t*c = abc_bitor($3.c);
+ c=converttype(c, TYPE_INT, $1.t);
+ $$.c = toreadwrite($1.c, c, 0, 0);
+ $$.t = $1.t;
+ }
E : E "+=" E {
code_t*c = $3.c;
if(TYPE_IS_INT($3.t) || TYPE_IS_UINT($3.t)) {
E : E "+=" E {
code_t*c = $3.c;
if(TYPE_IS_INT($3.t) || TYPE_IS_UINT($3.t)) {