This commit is contained in:
me 2025-12-26 20:08:02 +02:00
parent d894e9d460
commit 5919ab23c5
2 changed files with 3 additions and 3 deletions

View file

@ -8,6 +8,6 @@
<body>
<canvas id="glcanvas" tabindex='1' style="margin: auto; display: block; width: 720px; height: 720px"></canvas>
<script src="./mq_js_bundle.js"></script>
<script>load("./ayin.wasm");</script>
<script>load("./ayin-game.wasm");</script>
</body>
</html>

View file

@ -66,8 +66,8 @@ fn read_file() -> Result<ayin::ast::Program, String> {
}
}
#[cfg(target_arch = "wasm32")]
fn read_file() -> Result<ast::Program, String> {
let code = Ok(include_str!("../games/there-she-is.ayin").to_string());
fn read_file() -> Result<ayin::ast::Program, String> {
let code = include_str!("../games/there-she-is.ayin").to_string();
match ayin::parser::parse_file(code) {
Err(err) => Err(format!("Error: {err:#?}")),
Ok(program) => Ok(program),