ModularM
Modular3y ago
5 replies
Geo7

How to Implement Recursive data type

I want to Implement abstract syntax tree in mojo, so far no luck,
Something simple as this in C :
https://github.com/orangeduck/mpc/blob/master/mpc.h#L291
struct ast {
  char *tag;
  char *contents;
  int children_num;
  struct ast** children;
}
GitHub
A Parser Combinator library for C. Contribute to orangeduck/mpc development by creating an account on GitHub.
mpc/mpc.h at master · orangeduck/mpc
Was this page helpful?