Issue 135 in as3-commons: Invalid parsing of string operand when defining method body from source string.

6 views
Skip to first unread message

as3-c...@googlecode.com

unread,
Jan 5, 2013, 7:55:30 PM1/5/13
to as3-commons...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 135 by wojm...@gmail.com: Invalid parsing of string operand when
defining method body from source string.
http://code.google.com/p/as3-commons/issues/detail?id=135

What steps will reproduce the problem?
Adding the method body by defining the assembly source fully as a string
where opcode's operand is a string with spaces. For example:

pushstring abra kadabra

generate an error "has incorrect number of operands, ...".

What is the expected output? What do you see instead?
In this case, anly 2 tokens should be parsed, 'pushstring' and 'abra
kadabra'.

What version of the product are you using? On what operating system?
FLash CS6, win 7 x64

Please provide any additional information below.
So, in function Asm.convert(), I've replaced following line
var rawParams:Array = token.value.split(SINGLE_SPACE);
with
var rawParams:Array = splitParams( token.value );

and created private method "splitParams". Now one can write operand like
this:
pushstring "abra kadabra"

Modified Asm.as file in attachment.



Attachments:
Asm.as 16.3 KB

Reply all
Reply to author
Forward
0 new messages