[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/avm2 r9620: Replace type[oO]f with Type.ty
From: |
Tom Stellard |
Subject: |
[Gnash-commit] /srv/bzr/gnash/avm2 r9620: Replace type[oO]f with Type.typeof. |
Date: |
Tue, 14 Oct 2008 08:06:05 +0800 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9620
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Tue 2008-10-14 08:06:05 +0800
message:
Replace type[oO]f with Type.typeof.
Ignore String()
Replace Class.property with Reflect.field(Class,property)
modified:
testsuite/actionscript.all/haxe-swf9/as_to_hx.pl
=== modified file 'testsuite/actionscript.all/haxe-swf9/as_to_hx.pl'
--- a/testsuite/actionscript.all/haxe-swf9/as_to_hx.pl 2008-10-13 16:02:08
+0000
+++ b/testsuite/actionscript.all/haxe-swf9/as_to_hx.pl 2008-10-14 00:06:05
+0000
@@ -125,9 +125,16 @@
skip_line();
next;
}
+
+ #Replace things like String.charCodeAt with
Reflect.field(String,'charCodeAt').
+ $_ =~ s/(\w+)\.(\w+)\s*([\.\)])/Reflect.field($1,'$2')$3/g;
+
#Replace typeof:
- #TODO: Figure out the difference between typeof and typeOf
- if($_ =~ /type[Oo]f/ ){
+ #TODO: Handle typeof and typeOf differently?
+ $_ =~ s/type[Oo]f\(\s*(\S+)\s*\)/Type.typeof($1)/g;
+
+ #Skip String()
+ if($_ =~ /String\(\)/){
skip_line();
next;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/avm2 r9620: Replace type[oO]f with Type.typeof.,
Tom Stellard <=