krux02/ast-pattern-matching

A library to do pattern matching on the AST in the Nim programming language.

Nim
This is stars and forks stats for /krux02/ast-pattern-matching repository. As of 12 May, 2024 this repository has 98 stars and 10 forks.

Ast Pattern Matching matchAst(arg, matchErrors): of nnkStmtList( _, _, nnkForStmt( ident"i", nnkInfix, `mysym` @ nnkStmtList ) ): echo "The AST did match!!!" echo "The matched sub tree is the following:" echo mysym.lispRepr else: echo matchErrors echo "sadly the AST did not match :(" matchAst is where the magic happens. In the of-branch is a tree that is close to the output of lispRepr on an arbitrary NimNode. But it is not quite the same, for example the node kinds...
Read on GithubGithub Stats Page
repotechsstarsweeklyforksweekly
planety/prologueNim1.2k0430
nim-works/nimskullNimHTMLC2140300
Infinitybeond1/aurcNimMakefile8000
PMunch/nimlspNim3750470
status-im/nim-chroniclesNim1400230
oXis/NimWinAPICustomNim31060
unxsh/nitchNimShell419+341+1
HugoGranstrom/nimiSlidesNim75040
rotu/nim-recordsNim20000
zqqw/pakkuNimMakefileShell32040