Skip to content

Commit

Permalink
fix: Set the type of some of the literal expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoraggi committed Oct 29, 2023
1 parent 0ba424a commit c2c0d11
Show file tree
Hide file tree
Showing 7 changed files with 298 additions and 15 deletions.
4 changes: 3 additions & 1 deletion src/parser/cxx/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ class ExceptionSpecifierAST : public AST {
class ExpressionAST : public AST {
public:
using AST::AST;
ValueCategory valueCategory = ValueCategory::kNone;
ValueCategory valueCategory = ValueCategory::kPrValue;
std::optional<ConstValue> constValue;
const Type* type = nullptr;
};

class FunctionBodyAST : public AST {
Expand Down Expand Up @@ -2409,6 +2410,7 @@ class DecltypeSpecifierAST final : public SpecifierAST {
SourceLocation lparenLoc;
ExpressionAST* expression = nullptr;
SourceLocation rparenLoc;
const Type* type = nullptr;

void accept(ASTVisitor* visitor) override { visitor->visit(this); }

Expand Down
Loading

0 comments on commit c2c0d11

Please sign in to comment.