spirit icon indicating copy to clipboard operation
spirit copied to clipboard

Update sexpr_parser.hpp

Open rcoca opened this issue 7 months ago • 1 comments

updated rule for list - to have it captured in utree::list_type - and thus preserve the actual structure of the parsing tree

rcoca avatar Jun 08 '25 14:06 rcoca

Could you elaborate on why this fix is needed in the first place? I think the change is straightforward, but the PR is seriously lacking the context, I guess.

saki7 avatar Jun 15 '25 18:06 saki7

I tested the example, and it turns out the code compiles with or without the fix.

utree::list_type has a conversion constructor that allows transparent construction from utree, so there's no compelling reason to expose the internal list type in the example. While your version looks more strict in terms of parser attributes, I'm not convinced that's a sufficient reason to change a 15-year-old example.

Since I haven't received any further information since my last comment, I'm closing this for now. If you still believe the change is necessary, please explain your reasoning.

saki7 avatar Jun 27 '25 23:06 saki7

Sorry, I saw your message late. I trust you judgement here, the parser runs just fine and it does syntax check. It just builds a list - instead of an AST. But (AST) that's probably not example's aim.

rcoca avatar Jun 29 '25 05:06 rcoca