diff options
| author | Baitinq <[email protected]> | 2025-01-30 00:47:30 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-01-30 00:47:30 +0100 |
| commit | 5c58c0b9de67f14106be1365f2177f990e5b2711 (patch) | |
| tree | e0465ef0581f42d56726bf95136340d6ab7024c6 /src | |
| parent | Codegen: Support function calls in return statement (diff) | |
| download | pry-lang-5c58c0b9de67f14106be1365f2177f990e5b2711.tar.gz pry-lang-5c58c0b9de67f14106be1365f2177f990e5b2711.tar.bz2 pry-lang-5c58c0b9de67f14106be1365f2177f990e5b2711.zip | |
Examples: Fix example 2
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen.zig b/src/codegen.zig index cb94f3e..b60ffa6 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -214,6 +214,7 @@ pub const CodeGen = struct { const expression = statement.RETURN_STATEMENT.expression; + // TODO: Abstract this as we also need this for decls const num_argument: types.LLVMValueRef = switch (expression.*) { .PRIMARY_EXPRESSION => |primary_expression| switch (primary_expression) { .NUMBER => |n| core.LLVMConstInt(core.LLVMInt64Type(), @intCast(n.value), 0), |