From cfe785762dea9645c532b3a7817d9b6c58ecfce4 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Wed, 14 Aug 2024 18:27:15 +0800 Subject: [PATCH] llcppg/ast:basiclit --- chore/llcppg/ast/ast.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/chore/llcppg/ast/ast.go b/chore/llcppg/ast/ast.go index a2f5fa16..33a43181 100644 --- a/chore/llcppg/ast/ast.go +++ b/chore/llcppg/ast/ast.go @@ -44,6 +44,22 @@ type PPD interface { // preprocessing directive // ============================================================================= // Expressions (Types are also expressions) +type BasicLitKind uint + +const ( + IntLit BasicLitKind = iota + FloatLit + CharLit + StringLit +) + +type BasicLit struct { + Kind BasicLitKind + Value string +} + +func (*BasicLit) exprNode() {} + type TypeKind uint const (