diff options
| author | Josh Wolfe <thejoshwolfe@gmail.com> | 2015-12-03 12:15:07 -0700 |
|---|---|---|
| committer | Josh Wolfe <thejoshwolfe@gmail.com> | 2015-12-03 12:15:07 -0700 |
| commit | f1aaf1353e12aa39bd6f89588852a1c70e8424b3 (patch) | |
| tree | 38d2f72517dc257ef4f8eb09ff4ae84be0819201 /src/analyze.cpp | |
| parent | 6494cf208e8045c58e8ab79fb76e360cec077263 (diff) | |
| download | zig-f1aaf1353e12aa39bd6f89588852a1c70e8424b3.tar.gz zig-f1aaf1353e12aa39bd6f89588852a1c70e8424b3.zip | |
add bool literals
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 614b80052c..be2a181713 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -297,6 +297,7 @@ static void preview_function_declarations(CodeGen *g, ImportTableEntry *import, case NodeTypeStringLiteral: case NodeTypeUnreachable: case NodeTypeVoid: + case NodeTypeBoolLiteral: case NodeTypeSymbol: case NodeTypeCastExpr: case NodeTypePrefixOpExpr: @@ -592,6 +593,10 @@ static TypeTableEntry * analyze_expression(CodeGen *g, ImportTableEntry *import, return_type = g->builtin_types.entry_void; break; + case NodeTypeBoolLiteral: + return_type = g->builtin_types.entry_bool; + break; + case NodeTypeSymbol: { Buf *symbol_name = &node->data.symbol; @@ -766,6 +771,7 @@ static void analyze_top_level_declaration(CodeGen *g, ImportTableEntry *import, case NodeTypeStringLiteral: case NodeTypeUnreachable: case NodeTypeVoid: + case NodeTypeBoolLiteral: case NodeTypeSymbol: case NodeTypeCastExpr: case NodeTypePrefixOpExpr: |
