I'm really glad to see you're still working on this, but I don't think
this patch is ready to be merged yet.

On Sun, 2008-02-10 at 17:02 -0700, Stephen Weeks wrote:
> Okay, this works properly and 'make test' passes, varargs functions work
> fine, VISIBLE is no longer special-cased, subs aren't stuffed into
> lexicals when they're defined, they're properly looked up with
> find_name, a couple of fixes.

I don't think this is correct behavior. VISIBLE is a statement, but it
is not an expression. I can't find a defined return value for VISIBLE,
nor can I find any evidence that VISIBLE should set IT.

In additon, I can't find any evidence that '!' is a value. It is only a
special syntax case for VISIBLE.

> Function return values are a bit sketchy, but that's waiting on PAST
> support for return statements anyway, iirc.

They can currently be accomplished using inline PIR.
See /languages/ecmascript/src/parser/actions.pm for an example.

> Functions can't return null values, as null is currently being used as
> the 'end of statement' marker in expr_parse.

This will have to change. I interpret NOOB to be null. Function can
return NOOB using GTFO, for example.

> Optional parameters to functions aren't dealt with properly.
> 
> Auto-assignment to IT is still a bit sketchy.  I'm unsure of the proper
> semantics here, but the test suite passes, so it's good enough for now.

IT should only be set by a bare expression. Hence the special case in
the grammar. The new handling for IT is not correct because bare
expressions can consist of multiple tokens once we have proper support
for operators.

-- 
Stuart Jansen <[EMAIL PROTECTED]>
Guru Labs

Reply via email to