how should I architect a project that maps between regex syntaxes? (should I target Ast
or Hir
in regex-syntax
?)
#1167
-
As per this issue comment (#962 (comment)): As mentioned by @db48x in #962 (comment), emacs provides a high-level At first glance I think e.g. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Aye, just copying my answer here from #962 so that this can be marked as answered. :-) Feel free to edit your comment to remove the other copy hah.
Maybe? I've never done the exercise before, so I'm not sure. It's plausible the right target is Either target is reasonable IMO. With that said, if you need to deal with Unicode, then targeting the |
Beta Was this translation helpful? Give feedback.
Aye, just copying my answer here from #962 so that this can be marked as answered. :-) Feel free to edit your comment to remove the other copy hah.
Maybe? I've never done the exercise before, so I'm not sure. It's plausible the right target is
regex-syntax::hir::Hir
. Namely, anHir
is perhaps closer to what you might think of as a traditional AST where as anAst
is perhaps closer to a Concrete Syntax Tree. A concrete syntax tree essentially tries to describe the concrete syntax precisely so that it can be round-tripped. This makes it very detailed and pos…