Closed dzmitry-lahoda closed 1 year ago
I’d rather avoid heavy deps here, my prefenrce would be to use either something super simple (m_lexer), or just to hand-write stuff.
logos is simple. i mean it is simplier then m_regex for me. easy to read. less code. no need to learn m_regex to understand rowan. and heavy dep is heavy in example, not in release.
Logos is a proc macro, I want to avoid that.
i was thinking about some kind of flow, one may want to parse new language. it goes to logos, then to rowan, then to whatever integration on top. so example of starting from logos to rowan to be here. unlikely people will use m_lexer. so this pr saves some time of this process.
sure, could use logos without macro or use nightly rust to hack const and recursive types instead of doing enums+macro. but for what?
imho macroses are good here. DSL is selfspeacking.
because logos seems standard lexer in rust crates :)
so this makes examples more approachable for newcomers and more production ready