[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/avm2 r9622: Convert chr and ord functions.
From: |
Tom Stellard |
Subject: |
[Gnash-commit] /srv/bzr/gnash/avm2 r9622: Convert chr and ord functions. |
Date: |
Tue, 14 Oct 2008 11:47:42 +0800 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9622
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Tue 2008-10-14 11:47:42 +0800
message:
Convert chr and ord functions.
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-14 03:30:41
+0000
+++ b/testsuite/actionscript.all/haxe-swf9/as_to_hx.pl 2008-10-14 03:47:42
+0000
@@ -226,11 +226,11 @@
next;
}
- #Remove calls to chr and ord. I think these have been depreciated
since SWF v5.
- if($_ =~ /ord\(.+\)/ || $_ =~ /chr\(.+\)/){
- skip_line();
- next;
- }
+ #Convert calls to chr and ord. I think these have been depreciated
since SWF v5.
+ $_ =~ s/chr\(\s*(\w+)\s*\)/String.fromCharCode($1)/g;
+ $_ =~ s/ord\(\s*(\S+)\s*\)/$1.charCodeAt(0)/g;
+
+
#Replace String in "for .. in" loops that iterator over String's
properties with
#Type.getInstanceFields(String).
$_ =~
s/(for\s*\(\s*\w+\s*in\s*)String\s*\)/$1Type\.getInstanceFields\(String\)\)/g;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/avm2 r9622: Convert chr and ord functions.,
Tom Stellard <=