On Wed Apr 04 13:53:55 2012, ikegami@adaelis.com wrote:
> The builtin "if" should expect the following to follow it (ignoring
> whitespace)
>
> "(" EXPR ")" BLOCK ( "elsif" "(" EXPR ")" BLOCK )* ( "else" BLOCK )?
>
> None of those tokens should be overridable when parsing that rule
(although
> EXPR and BLOCK may use overridden tokens).
In that case, is there any reason why elsif needs to be a reserved word
outside of that context?
Iâm also trying to plan ahead with regard to adding all keywords to the
CORE:: namespace.
It should be possible in the future for the âifâ keyword to be
implemented as a CV named &CORE::if, which has its own custom parser
that eats the elsif and else keywords.
But it wonât make much sense for there to be a &CORE::elsif subroutine.
It would just be a stub that produces a syntax error when inlined.
Maybe that does make sense. Then we could always change it later.
--
Father Chrysostomos
Thread Previous
|
Thread Next