1
0
Fork 0

Remove unnecessary quotes

This commit is contained in:
Alex Kotov 2023-05-05 22:16:29 +04:00
parent 786258931d
commit 84cb115cdf
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 8 additions and 8 deletions

View File

@ -68,7 +68,7 @@ int main()
assert(eval(num_123) == num_123); assert(eval(num_123) == num_123);
// (quote foo) // (quote foo)
// 'foo // foo
assert( assert(
eval( eval(
Object_build_list(2, Object_new_symbol("quote"), sym_foo) Object_build_list(2, Object_new_symbol("quote"), sym_foo)
@ -84,7 +84,7 @@ int main()
); );
// (quote ()) // (quote ())
// '() // ()
assert(eval_str("(quote ())") == NULL); assert(eval_str("(quote ())") == NULL);
// (quote 123) // (quote 123)
@ -144,7 +144,7 @@ void test_arcane_SLASH_tokenize()
struct Object *result = NULL; struct Object *result = NULL;
// (arcane/tokenize "(") // (arcane/tokenize "(")
// '((TOKEN_ROUND_OPEN . "")) // ((TOKEN_ROUND_OPEN . ""))
result = eval(Object_build_list( result = eval(Object_build_list(
2, 2,
Object_new_symbol("arcane/tokenize"), Object_new_symbol("arcane/tokenize"),
@ -159,7 +159,7 @@ void test_arcane_SLASH_tokenize()
assert(strcmp(result->pair.a->pair.b->s, "(") == 0); assert(strcmp(result->pair.a->pair.b->s, "(") == 0);
// (arcane/tokenize "#false") // (arcane/tokenize "#false")
// '((TOKEN_TAG . "false")) // ((TOKEN_TAG . "false"))
result = eval(Object_build_list( result = eval(Object_build_list(
2, 2,
Object_new_symbol("arcane/tokenize"), Object_new_symbol("arcane/tokenize"),
@ -174,7 +174,7 @@ void test_arcane_SLASH_tokenize()
assert(strcmp(result->pair.a->pair.b->s, "false") == 0); assert(strcmp(result->pair.a->pair.b->s, "false") == 0);
// (arcane/tokenize "(displayln (list 1))") // (arcane/tokenize "(displayln (list 1))")
// '((TOKEN_ROUND_OPEN . "(") (TOKEN_IDENT . "displayln") (TOKEN_ROUND_OPEN . "(") (TOKEN_IDENT . "list") (TOKEN_NUM . "1") (TOKEN_ROUND_CLOSE . ")") (TOKEN_ROUND_CLOSE . ")")) // ((TOKEN_ROUND_OPEN . "(") (TOKEN_IDENT . "displayln") (TOKEN_ROUND_OPEN . "(") (TOKEN_IDENT . "list") (TOKEN_NUM . "1") (TOKEN_ROUND_CLOSE . ")") (TOKEN_ROUND_CLOSE . ")"))
result = eval(Object_build_list( result = eval(Object_build_list(
2, 2,
Object_new_symbol("arcane/tokenize"), Object_new_symbol("arcane/tokenize"),
@ -289,11 +289,11 @@ void test_list()
struct Object *const num_456 = Object_new_number(456); struct Object *const num_456 = Object_new_number(456);
// (list) // (list)
// '() // ()
assert(eval_str("(list)") == NULL); assert(eval_str("(list)") == NULL);
// (list 123) // (list 123)
// '(123) // (123)
result = eval(Object_build_list( result = eval(Object_build_list(
2, 2,
Object_new_symbol("list"), Object_new_symbol("list"),
@ -304,7 +304,7 @@ void test_list()
assert(OBJECT_IS_NULL(result->pair.b)); assert(OBJECT_IS_NULL(result->pair.b));
// (list 123 456) // (list 123 456)
// '(123 456) // (123 456)
result = eval(Object_build_list( result = eval(Object_build_list(
3, 3,
Object_new_symbol("list"), Object_new_symbol("list"),