gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/avm2 r9594: Convert calls to String.fromCh


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9594: Convert calls to String.fromCharCode(), that have more than one argument, to something that works in Haxe.
Date: Thu, 09 Oct 2008 01:12:11 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9594
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Thu 2008-10-09 01:12:11 +0800
message:
  Convert calls to String.fromCharCode(), that have more than one argument, to 
something that works in Haxe.
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-08 16:29:02 
+0000
+++ b/testsuite/actionscript.all/haxe-swf9/as_to_hx.pl  2008-10-08 17:12:11 
+0000
@@ -201,10 +201,12 @@
        #Replace undefined with null.
        $_ =~ s/undefined/null/g;
 
-       #Remove calls to fromCharCode.  Haxe only alows one argument to this 
function.
+       #Haxe only allows one argument to String.fromCharCode(), so replace
+       #String.fromCharCode(1,2) with String.fromCharCode(1) + 
String.fromCharCode(2)
        if($_ =~ /String.fromCharCode\(.+\)/){
-               skip_line();
-               next;
+               
+               #TODO: Can this be combined with regex above?
+               $_ =~ s/,\s*(\w+)\s*/) + String.fromCharCode($1/g;
        }
        
        #Remove calls to call function.  I haven't found a Haxe equivilent for 
this.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]