Skip to content

Commit

Permalink
Merge pull request #679 from xushiwei/hmac
Browse files Browse the repository at this point in the history
llcppg/ast: ppdNode
  • Loading branch information
xushiwei authored Aug 8, 2024
2 parents 3992dd1 + cab29c2 commit 93c33e0
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion chore/llcppg/ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ type Stmt interface {
stmtNode()
}

type PPD interface { // preprocessing directive
Node
ppdNode()
}

// =============================================================================
// Expressions (Types are also expressions)

Expand Down Expand Up @@ -226,6 +231,8 @@ type EnumItem struct {
Value Expr // optional
}

func (*EnumItem) exprNode() {}

// enum Name { Item1, Item2, ... };
type EnumTypeDecl struct {
DeclBase
Expand Down Expand Up @@ -261,8 +268,25 @@ func (*TypeDecl) declNode() {}
// =============================================================================
// AST File

type Include struct {
Path string
}

func (*Include) ppdNode() {}

// ------------------------------------------------

type Macro struct {
}

func (*Macro) ppdNode() {}

// ------------------------------------------------

type File struct {
Decls []Decl
Decls []Decl
Includes []*Include
Macros []*Macro
}

// =============================================================================

0 comments on commit 93c33e0

Please sign in to comment.