Skip to content

Commit

Permalink
Polish the macro interface (#506)
Browse files Browse the repository at this point in the history
* Polish the macro interface

* make more methods public
make macro take a mutable parser for symbol_gen
rename methods

* address nits

* get_head -> name

* nits

* make Macro::name return Symbol than String
  • Loading branch information
yihozhang authored Jan 6, 2025
1 parent 2dfd4f3 commit 802c87b
Show file tree
Hide file tree
Showing 4 changed files with 648 additions and 573 deletions.
2 changes: 1 addition & 1 deletion src/ast/desugar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub(crate) fn desugar_command(
let s = std::fs::read_to_string(&file)
.unwrap_or_else(|_| panic!("{span} Failed to read file {file}"));
return desugar_program(
parse_program(Some(file), &s, parser)?,
parser.get_program_from_string(Some(file), &s)?,
parser,
seminaive_transform,
);
Expand Down
Loading

0 comments on commit 802c87b

Please sign in to comment.