Skip to content

Commit

Permalink
Remove consts (because we need to set these names somehow)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhutchings committed Jun 26, 2024
1 parent ef78539 commit e669ebf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser/cst.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ typedef struct {
typedef struct {
// TODO -- add parameters whe we get there
BlockStatement body;
const char name[256]; // The actual name of the function.
char name[256]; // The actual name of the function.
} FunctionDeclaration;

// An entire program is just a list of top level declarations.
Expand All @@ -44,14 +44,14 @@ typedef struct {
// Right now, a function call doesn't have any parameters so it's just the name
// of the function being called.
typedef struct {
const char name[256];
char name[256];
} FunctionCall;

// An expression for now is an integer or a function call.
typedef struct {
union {
FunctionCall fc;
const char literal[256];
char literal[256];
} u;
NodeType type;
} Expression;
Expand Down

0 comments on commit e669ebf

Please sign in to comment.