Change output of AST::iter_functions.

This commit is contained in:
Stephen Chung
2020-12-12 16:31:13 +08:00
parent dbdb8f43b7
commit 1087c338bd
4 changed files with 27 additions and 5 deletions

View File

@@ -144,7 +144,18 @@ fn main() {
#[cfg(not(feature = "no_function"))]
main_ast
.iter_functions()
.for_each(|(_, _, _, _, f)| println!("{}", f));
.for_each(|(_, access, name, _, params)| {
println!(
"{}{}({}) -> Dynamic",
if access.is_private() { "private " } else { "" },
name,
params
.iter()
.map(|s| s.as_str())
.collect::<Vec<_>>()
.join(", ")
)
});
println!();
continue;