On Sun, Apr 17, 2011 at 1:48 PM, Chinnu <[email protected]> wrote:

> Thank you Stephan, for the clarification. Actually, I'm interested in
> the result of the expression. For instance, in the above example of
> eval('a'+'b'), I'm trying to gather the string 'ab'. I'm wondering on
> how to parse the args for this.
>

They don't need to be parsed, as v8 has already processed them. In this
example case, args[0] would return "ab" as a value handle holding a string
value. Or am i misunderstanding your question?

Note that v8 has a built-in "eval" command, and getting access to it
requires something like this:

Local<Object> evalObj = v8::Context::GetCurrent()->Global();
Local<Function> eval = v8::Function::Cast(
*(evalObj->Get(v8::String::New("eval"))) );


-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to