feat: quote, nth
This commit is contained in:
@@ -168,3 +168,16 @@ int special_form_lambda(Nodes args, Scopes *scopes, Node *result) {
|
||||
result->as_lambda.body = body;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int special_form_quote(Nodes args, Scopes *scopes, Node *result) {
|
||||
UNUSED(scopes);
|
||||
|
||||
if (args.count != 1) {
|
||||
printf("'quote' expects one argument!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Node n = args.items[0];
|
||||
*result = n;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user