Hoa compiler - feedback + help

Hello, I’m back with graphql. I’m happy with the result but I still have some issue (I need node with exclusive synthaxe)

But I would like to provide some feedback :

  • in the documentation I don’t find anything explaining the différence between “#foo:” and “foo:”
  • in don’t find easy to understand that the order of declaration of the token have an huge impact (the documentation should be more explicit and provide example about it). in my case the root node and the token that can be assimilated as string (name)

Hello :slight_smile:,

foo: is used to declare a rule. A rule can contain an node ID, for instance:

    <tokenA> <tokenB> ::tokenC:: #xoxo

It will generate a node in the AST named xoxo with 2 childrens: tokenA and tokenB. tokenC is recognized and consumed but not kept in the tree.

If you rename xoxo to foo, you obtain:

    <tokenA> <tokenB> ::tokenC:: #foo

which can be rewrite into:

    <tokenA> <tokenB> ::tokenC::

It means: The rule will always a node of the same name than the rule name.

And yes, order of lexeme declaration is important. Do you think we should strike this fact on the documentation?

yes, I think the documentation should be improved a bit. Because it’s one of the point that make me lose a lot of time!

First, sorry for that! Second, can you open an issue on the Github repository please?