nim-lang / fusion

Fusion is for now an idea about how to grow Nim's ecosystem without the pain points of more traditional approaches.
MIT License
128 stars 16 forks source link

New example for buildAst #47

Closed planetis-m closed 3 years ago

planetis-m commented 3 years ago

Fixes #43. This is a simplified (and ported to buildAst) version of the Reverse Polish Notation calculator macro from @PMunch blog post "Metaprogramming and read- and maintainability in Nim". Macro is tiny but together with the rest, amounts to a total 40 lines of code.

planetis-m commented 3 years ago

Oh boy found a compiler/macro bug, reported nim-lang/nim#16072

planetis-m commented 3 years ago

I think found a shorter example