diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-10-01 20:01:00 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-10-01 20:01:00 +0100 |
| commit | 8f39ebbe5a7628e8d4597d39f9253c23fead53a6 (patch) | |
| tree | 4691aaea6b691c0bd38bea4ae8c1808a93208218 /src/exact_value.cpp | |
| parent | c1e720a49b3dedf5ad8f0b4b2b444bf3f160834f (diff) | |
Procedure literals for default values in structs
Diffstat (limited to 'src/exact_value.cpp')
| -rw-r--r-- | src/exact_value.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/exact_value.cpp b/src/exact_value.cpp index 4f9f1e40f..ac70b42f4 100644 --- a/src/exact_value.cpp +++ b/src/exact_value.cpp @@ -22,6 +22,7 @@ enum ExactValueKind { ExactValue_Complex, ExactValue_Pointer, ExactValue_Compound, // TODO(bill): Is this good enough? + ExactValue_Procedure, // TODO(bill): Is this good enough? ExactValue_Type, ExactValue_Count, @@ -37,6 +38,7 @@ struct ExactValue { i64 value_pointer; Complex128 value_complex; AstNode * value_compound; + AstNode * value_procedure; Type * value_type; }; }; @@ -109,6 +111,12 @@ ExactValue exact_value_type(Type *type) { return result; } +ExactValue exact_value_procedure(AstNode *node) { + ExactValue result = {ExactValue_Procedure}; + result.value_procedure = node; + return result; +} + ExactValue exact_value_integer_from_string(String string) { return exact_value_u128(u128_from_string(string)); |