mindustry logic execution, map- and schematic- parsing and rendering
fix escapes
| -rw-r--r-- | lemu/Cargo.toml | 2 | ||||
| -rw-r--r-- | lemu/src/memory.rs | 2 | ||||
| -rw-r--r-- | lemu/yes.mlog | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/lemu/Cargo.toml b/lemu/Cargo.toml index 70e1b8d..84f4a11 100644 --- a/lemu/Cargo.toml +++ b/lemu/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lemu" -version = "0.1.2" +version = "0.1.3" edition = "2021" description = "M-LOG runner" authors = ["bend-n <[email protected]>"] diff --git a/lemu/src/memory.rs b/lemu/src/memory.rs index 9dd0828..b350110 100644 --- a/lemu/src/memory.rs +++ b/lemu/src/memory.rs @@ -58,7 +58,7 @@ impl std::fmt::Display for LVar<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Num(n) => write!(f, "{n}"), - Self::String(s) => write!(f, r#""{s}""#), + Self::String(s) => write!(f, r#"{}"#, s.replace(r"\n", "\n")), } } } diff --git a/lemu/yes.mlog b/lemu/yes.mlog new file mode 100644 index 0000000..3efea3f --- /dev/null +++ b/lemu/yes.mlog @@ -0,0 +1,2 @@ +print "yes\n" +jump 0 always |