Skip to content

Commit aa1bcb9

Browse files
author
TheDevConnor
committed
implemented __syscall__ into luma! It only works on x86_64Linux systems atm
1 parent 418a640 commit aa1bcb9

File tree

18 files changed

+2240
-1308
lines changed

18 files changed

+2240
-1308
lines changed

src/ast/ast.h

Lines changed: 454 additions & 447 deletions
Large diffs are not rendered by default.

src/ast/ast_definistions/expr.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,14 @@ AstNode *create_system_expr(ArenaAllocator *arena, Expr *command, size_t line,
194194
return node;
195195
}
196196

197+
AstNode *create_syscall_expr(ArenaAllocator *arena, Expr **args, size_t count,
198+
size_t line, size_t col) {
199+
AstNode *node = create_expr(arena, AST_EXPR_SYSCALL, line, col);
200+
node->expr.syscall.args = args;
201+
node->expr.syscall.count = count;
202+
return node;
203+
}
204+
197205
AstNode *create_sizeof_expr(ArenaAllocator *arena, Expr *object, bool is_type,
198206
size_t line, size_t col) {
199207
AstNode *node = create_expr(arena, AST_EXPR_SIZEOF, line, col);

0 commit comments

Comments
 (0)