summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'types.h')
-rw-r--r--types.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/types.h b/types.h
index aabf246..d3a4e35 100644
--- a/types.h
+++ b/types.h
@@ -336,10 +336,12 @@ typedef struct NumLiteral {
};
} NumLiteral;
-typedef struct StrLiteral {
+typedef struct String {
char *str;
size_t len;
-} StrLiteral;
+} String;
+
+typedef String StrLiteral;
typedef struct {
U32 line;
@@ -793,10 +795,10 @@ typedef struct Expression {
struct {
BinaryOp op;
struct Expression *lhs;
- struct Expression *rhs;
union {
- Field *field; /* for struct. */
- } dot;
+ struct Expression *rhs;
+ Field *field; /* for struct., after resolving */
+ };
} binary;
CallExpr call;
struct {
@@ -808,7 +810,8 @@ typedef struct Expression {
BuiltinVal val;
} which;
} builtin;
- Identifier ident;
+ String ident_str; /* before typing */
+ Identifier ident; /* after typing */
NewExpr new;
Namespace *nms;
struct {