You might want to add a mode-dependent function in the Mode recode
(Yi.Buffer.Misc) that prints the syntax tree...
-- JP

On Mon, Jun 1, 2009 at 3:54 PM, Deniz Dogan <[email protected]> wrote:
>
> Hi
>
> I'm currently writing a little example mode for Yi and I'd like to
> verify that the parser works as it should.  However, I can't figure
> out how to trace the resulting AST without implementing dummy stroking
> functionality.  Below is the code I'm currently using, but I have to
> replace "XYZ" with something which actually "performs" the parsing and
> returns the AST, so that I can "show" it.
>
> parser = let res = program <* eof in trace (show $ XYZ $ res) res
>
> program = PIdent <$> pId <*> program
>      <|> POper <$> pOp
>      <|> PErr <$> recoverWith (symbol (const True))
>
> --
> Deniz Dogan
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
[email protected]
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to