Fixed errors
This commit is contained in:
+24
-24
@@ -91,33 +91,33 @@ pub class Application {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub i32 loops_test() {
|
i32 test_stmt() {
|
||||||
for (x : 0..10) {
|
if (0 == 0) {
|
||||||
println!("{x}");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var mut i = 0; i < 10; i++) {
|
|
||||||
println!("{i}");
|
|
||||||
}
|
|
||||||
|
|
||||||
var i = 0;
|
|
||||||
|
|
||||||
while (i == 0) {
|
|
||||||
println!("hi");
|
|
||||||
}
|
|
||||||
|
|
||||||
loop {
|
|
||||||
println!("loop!");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (x == 0) bro();
|
|
||||||
else bro();
|
|
||||||
|
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub i32 bro() {
|
void loops_test() {
|
||||||
0
|
for (x : 0..10) {
|
||||||
|
println!("{x}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var mut i = 0; i < 10; i++) {
|
||||||
|
println!("{i}");
|
||||||
|
}
|
||||||
|
|
||||||
|
var i = 0;
|
||||||
|
|
||||||
|
while (i == 1) {
|
||||||
|
println!("hi");
|
||||||
|
}
|
||||||
|
|
||||||
|
loop {
|
||||||
|
println!("loop!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+7
-3
@@ -1,7 +1,7 @@
|
|||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
env, fs,
|
env, fs,
|
||||||
path::PathBuf,
|
path::{MAIN_SEPARATOR, PathBuf},
|
||||||
process::{Command, Stdio},
|
process::{Command, Stdio},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -44,6 +44,8 @@ pub fn build(mut args: Vec<String>, root: PathBuf) -> bool {
|
|||||||
|
|
||||||
let mut mapping = HashMap::new();
|
let mut mapping = HashMap::new();
|
||||||
|
|
||||||
|
let mist_src = format!(".mist{MAIN_SEPARATOR}src");
|
||||||
|
|
||||||
for message in cargo_metadata::Message::parse_stream(&mut reader) {
|
for message in cargo_metadata::Message::parse_stream(&mut reader) {
|
||||||
match message {
|
match message {
|
||||||
Ok(Message::CompilerMessage(msg)) => {
|
Ok(Message::CompilerMessage(msg)) => {
|
||||||
@@ -53,8 +55,10 @@ pub fn build(mut args: Vec<String>, root: PathBuf) -> bool {
|
|||||||
|
|
||||||
let mist_file = span
|
let mist_file = span
|
||||||
.file_name
|
.file_name
|
||||||
.replacen(".mist/src", "src", 1)
|
.replacen(&mist_src, "src", 1)
|
||||||
.replace(".rs", ".mist");
|
.trim_end_matches(".rs")
|
||||||
|
.to_string()
|
||||||
|
+ ".mist";
|
||||||
|
|
||||||
let mist_path = root.join(&mist_file);
|
let mist_path = root.join(&mist_file);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user