mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-16 09:35:07 +01:00
parse decl statements
This commit is contained in:
parent
8093f87fc3
commit
727cfc692c
5 changed files with 293 additions and 33 deletions
|
|
@ -91,7 +91,8 @@ pub enum Expr {
|
|||
|
||||
#[derive(Debug, DebugPls)]
|
||||
pub enum Stmt {
|
||||
Labeled(Box<Spanned<Stmt>>),
|
||||
Decl(Decl),
|
||||
Labeled{label: Ident, stmt: Box<Spanned<Stmt>>},
|
||||
Compound(Vec<Spanned<Stmt>>),
|
||||
If {
|
||||
cond: Expr,
|
||||
|
|
@ -232,7 +233,7 @@ pub struct Declarator {
|
|||
#[derive(Debug, DebugPls)]
|
||||
pub struct FunctionDef {
|
||||
pub decl: Decl,
|
||||
pub body: Vec<Stmt>,
|
||||
pub body: Vec<Spanned<Stmt>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue