alma icon indicating copy to clipboard operation
alma copied to clipboard

Implement the node matching language from the Stavro parser branch

Open masak opened this issue 5 years ago • 4 comments

tbd

masak avatar May 01 '19 08:05 masak

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!

masak avatar Sep 21 '22 01:09 masak

I guess that’s the bit mentioned there? https://github.com/masak/alma/blob/8d4c56d5901e1d6c3d3852f885b0f3029fdb4b8e/lib/_007/Test/Matcher.pm#L12-L15

vendethiel avatar Sep 21 '22 06:09 vendethiel

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.

masak avatar Sep 21 '22 07:09 masak

I wonder if I was unconsciously inspired by HAML...

masak avatar Sep 27 '22 07:09 masak