Re: Patch and test to allow component calls
Jonathan Swartz <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
>>So how about this: If a <&| &> tag contains a literal string as defined >>above, then you can use either </&> or </& LITERAL>, where LITERAL is >>the exact literal they specified. Otherwise, they can only use </&>. >>This is mostly as John suggested, except that we don't let them use </&> >>for expressions. >> >>I'm assuming that literals are vastly more common than expressions in >><&| &> tags, so this should give Alex what he wants in most cases. >>Except that he won't be able to stick long diary entries in his </&> tag. >> >>What do you think? > > > The code that determines if something is a literal is not the parsing > code, so implementing this would require some extra talking back and forth > between lexer & compiler, which doesn't seem like a good design. We should implement it as cleanly as possible. But this is a pretty clear and simple language rule, so if it can't be implemented easily, that's a flexibility problem that needs to be fixed in our lexer/compiler framework. (We could always move it back to a single subroutine called parse(). :)) Perhaps the parsing code could determine if the component path is a literal, and output different tokens for literals and not literals. Just a vague suggestion, I'm not familiar enough with the code. Jon ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php