ref: cee3c78840d9cde8172fb8f167a75f20ecf6451c
parent: efd8060bae1542dd17556dcdc182b18b5bc35d36
author: smazga <smazga@greymanlabs.com>
date: Mon Oct 12 12:47:17 EDT 2020
macro
--- a/reader.ml
+++ b/reader.ml
@@ -100,9 +100,9 @@
print_endline (" sym: " ^ Printer.print sym true); print_endline (" rest: " ^ Printer.dump rest);(match rest with
- | T.List { T.value = [ T.Symbol { T.value = "syntax-rules" }; foo ] } ->- print_endline (" foo: " ^ foo)- | _ -> print_endline ("xxxxxxxx"))+ | T.List { T.value = T.Symbol { T.value = "syntax-rules" } :: _ :: clauses } :: [] ->+ print_endline (" clauses: " ^ Printer.dump clauses)+ | _ as y -> print_endline ("xxxxxxxx: " ^ Printer.dump y)) | _ as x -> print_endline (" rest: " ^ Printer.dump x)); (* | T.List { T.value = [ T.Symbol { T.value = "define-syntax" }; keyword; T.List { T.value = macro } ] } ->* (match macro with
@@ -112,11 +112,6 @@
* macro_entry) *)
{ form = Types.list list_reader.list_form; tokens = list_reader.tokens }-(* (match ast with
- * | [] -> raise End_of_file
- * | hd :: tl -> print_endline (" macro: " ^ String.concat " " tl));- * raise (Syntax_error ("macro botch"))- * | _ -> raise (Syntax_error "bad macro read") *)
and read_form all_tokens =
(* print_endline ("READ_FORM: " ^ String.concat " " all_tokens); *)match all_tokens with
--
⑨