alma
alma copied to clipboard
Implement the node matching language from the Stavro parser branch
tbd
I demand of my past left to come back and explain himself here. Three years later, I don't even properly remember the Stavro parser branch. It had a node matching language worth copying, you say? Tell me more!
I guess that’s the bit mentioned there? https://github.com/masak/alma/blob/8d4c56d5901e1d6c3d3852f885b0f3029fdb4b8e/lib/_007/Test/Matcher.pm#L12-L15
Hmm, so it would seem. The present me is only moderately impressed by this format, but I'm assuming past me had some legitimate reason to like it. I've always wondered if XPath could be productively used for something like this. The matcher syntax seems marginally more fit-for-purpose than XPath.
I'd also like to know if my past self only had plans to use this for matching (which I think would be enough for parsing), or if there was also plans to make the format support AST transformations, a bit more like template macros.
I wonder if I was unconsciously inspired by HAML...