Quoting Bert Wesarg <[EMAIL PROTECTED]>:
> This removes the ugly parsing of the "define" keyword. It solves this by
> saving and restoring the state of the program accumulation. This solves
> a long standing problam, that parts between "define" definition aren't
> in the same scope, i.e. this works now:
>
> a = 0
>
> define t {
> }
>
> t_print(a "\n")
>
>
...
Wow! Well done!
Just to nit-pick: I'd have used a name like ParserContext instead of
AccumulatorData to store, well, the parser context...
Anyway, this looks pretty cool - I'll have to give it a try. BTW, I think we
should forbid "define"ing a function that has the same name as a built-in
function (or a macro-callable action routine, for that matter). Currently you
can
define replace_in_string {
s = ""
for (i = 1; i <= $n_args; ++i)
s = s $args[i] "\n"
dialog(s)
}
and so break loads of useful stuff!
Tony
--
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop