hime icon indicating copy to clipboard operation
hime copied to clipboard

How to make language specific AST?

Open stevefan1999-personal opened this issue 8 months ago • 1 comments

I want to produce my own AST like this:

pub struct Expr {
    Atom(Identifier),
    Constant(Constant),
    Unary(Operator, Box<Expr>),
    Binary(Box<Expr>, Operator, Box<Expr>),
    Declare(Type, Identifier, Option<Box<Expr>>),
}

What is the best way to let us handle the AST forming part?

stevefan1999-personal avatar Oct 15 '23 11:10 stevefan1999-personal