More infrastructure.
Improve handling of memory.grow/size, add a standalone wast runner, test harness improvements.
This commit is contained in:
@@ -29,10 +29,14 @@ fn main() {
|
||||
writeln!(
|
||||
out,
|
||||
"fn {}() {{",
|
||||
path.file_stem()
|
||||
.expect("file_stem")
|
||||
.to_str()
|
||||
.expect("to_str")
|
||||
avoid_keywords(
|
||||
&path
|
||||
.file_stem()
|
||||
.expect("file_stem")
|
||||
.to_str()
|
||||
.expect("to_str")
|
||||
.replace("-", "_")
|
||||
)
|
||||
);
|
||||
writeln!(
|
||||
out,
|
||||
@@ -44,3 +48,14 @@ fn main() {
|
||||
writeln!(out);
|
||||
}
|
||||
}
|
||||
|
||||
fn avoid_keywords(name: &str) -> &str {
|
||||
match name {
|
||||
"if" => "if_",
|
||||
"loop" => "loop_",
|
||||
"type" => "type_",
|
||||
"const" => "const_",
|
||||
"return" => "return_",
|
||||
other => other,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user