diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-05 23:57:34 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-05 23:57:34 +0100 |
| commit | 60711dd355540b0b315a4508fc40b0e3b4df7bc9 (patch) | |
| tree | e6110b311e74b6ac41f7bc6367571bc0f4ba158f /src/entity.cpp | |
| parent | fad3947e26266ada585f6879652fccf7c142e044 (diff) | |
Refactor default parameter values
Diffstat (limited to 'src/entity.cpp')
| -rw-r--r-- | src/entity.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index fa76026ff..1374f8c06 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -56,6 +56,19 @@ enum EntityState { }; +enum ParameterValueKind { + ParameterValue_Invalid, + ParameterValue_Constant, + ParameterValue_Nil, + ParameterValue_Location, +}; + +struct ParameterValue { + ParameterValueKind kind; + ExactValue value; +}; + + // An Entity is a named "thing" in the language struct Entity { EntityKind kind; @@ -84,7 +97,9 @@ struct Entity { struct { i32 field_index; i32 field_src_index; - ExactValue default_value; + + ParameterValue param_value; + String thread_local_model; Entity * foreign_library; Ast * foreign_library_ident; @@ -93,9 +108,8 @@ struct Entity { bool is_foreign; bool is_export; - bool default_is_nil; - bool default_is_undef; - bool default_is_location; + // bool default_is_nil; + // bool default_is_location; bool is_immutable; } Variable; struct { |