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:
4d69b9f
)
simplified new() for local classes
author
kramm
<kramm>
Tue, 30 Dec 2008 22:59:27 +0000
(22:59 +0000)
committer
kramm
<kramm>
Tue, 30 Dec 2008 22:59:27 +0000
(22:59 +0000)
lib/as3/parser.y
patch
|
blob
|
history
diff --git
a/lib/as3/parser.y
b/lib/as3/parser.y
index
08900d1
..
e46cded
100644
(file)
--- a/
lib/as3/parser.y
+++ b/
lib/as3/parser.y
@@
-1505,8
+1505,12
@@
NEW : "new" CLASS MAYBE_PARAM_VALUES {
MULTINAME(m, $2);
$$.c = code_new();
MULTINAME(m, $2);
$$.c = code_new();
- /* TODO: why do we have to *find* our own classes? */
- $$.c = abc_findpropstrict2($$.c, &m);
+ if($2->slot) {
+ $$.c = abc_getglobalscope($$.c);
+ $$.c = abc_getslot($$.c, $2->slot);
+ } else {
+ $$.c = abc_findpropstrict2($$.c, &m);
+ }
typedcode_list_t*l = $3;
int len = 0;
typedcode_list_t*l = $3;
int len = 0;
@@
-1515,7
+1519,10
@@
NEW : "new" CLASS MAYBE_PARAM_VALUES {
l = l->next;
len ++;
}
l = l->next;
len ++;
}
- $$.c = abc_constructprop2($$.c, &m, len);
+ if($2->slot)
+ $$.c = abc_construct($$.c, len);
+ else
+ $$.c = abc_constructprop2($$.c, &m, len);
$$.t = $2;
}
$$.t = $2;
}