Also, this error seems to occur only when the function declaration and
the function call are in the same line. If I move the functio call
"test("test Arg1", "testArg2");" to a new line, the compilation does
not fail. Could this be a small parser issue?
Thanks,
Ravi
On Jul 17, 3:40 pm, Ravi <[email protected]> wrote:
> Hi,
>
> I'm having an issue with passing string arguments with spaces in them
> to function in java script. For example,
> the following simple script throws an error on Script::Compile:
>
> <script language="JavaScript">function test(arg1,arg2){document.write
> (arg1);};test("test Arg1","testArg2")</script>
>
> SyntaxError: Unexpected token ILLEGAL.
>
> The error location is the space in "test Arg1".
>
> While, the below script without any space in the argument compiles and
> runs fine:
>
> <script language="JavaScript">function test(arg1,arg2){document.write
> (arg1);};test("testArg1","testArg2")</script>
>
> Please let me know if anyone has seen a similar issue, or if I need to
> do additional steps before compiling script.
>
> Thank you,
> Ravi
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---