Run some improvements to the code
This commit is contained in:
parent
9f5c78ca64
commit
a539eb6ff1
3 changed files with 17 additions and 9 deletions
13
README
13
README
|
@ -14,13 +14,14 @@ Latest release and setup
|
|||
----------------------------
|
||||
Clone this repository to get the latest development version.
|
||||
|
||||
Currently we are at version 0.2 of the software.
|
||||
Currently we are at version 0.2.1 of the software.
|
||||
|
||||
If you'd like the point release (stable) version, run this command below:
|
||||
git reset --hard c0ffee6
|
||||
If you'd like the point release (stable) version, run these commands below:
|
||||
git reset --hard 0.2.1
|
||||
cargo build --release
|
||||
|
||||
This will reset your git tree back to the latest version that is stable.
|
||||
|
||||
You will then want to run build.sh to build it.
|
||||
If you want the latest development release, run these commands:
|
||||
git pull
|
||||
cargo build
|
||||
|
||||
You will also want to download the accompanying macros repository and place it in the same directory as the lintc binary or your working directory.
|
||||
|
|
2
build.rs
2
build.rs
|
@ -1,4 +1,6 @@
|
|||
fn main() {
|
||||
println!("cargo:rerun-if-changed=src/main.rs");
|
||||
println!("cargo:rerun-if-changed=Cargo.toml");
|
||||
eprintln!("Building lintc...");
|
||||
built::write_built_file().expect("Failed to acquire build-time information")
|
||||
}
|
||||
|
|
11
src/main.rs
11
src/main.rs
|
@ -8,8 +8,14 @@ pub mod built_info {
|
|||
}
|
||||
|
||||
fn builtinf() {
|
||||
println!("This is version {}, built for {}", built_info::PKG_VERSION, built_info::TARGET);
|
||||
if let (Some(v), Some(hash)) = (built_info::GIT_VERSION, built_info::GIT_COMMIT_HASH,) { println!("It is tagged {}, commit {}",v, hash); }
|
||||
if let (Some(v), Some(hash)) = (built_info::GIT_VERSION, built_info::GIT_COMMIT_HASH,) {
|
||||
if built_info::PKG_VERSION == v { println!("You are running lintc {}!", built_info::PKG_VERSION); }
|
||||
else { println!("You are running lintc {}, commit {}!", v, hash); }
|
||||
} else {
|
||||
println!("I could not determine what version of lintc you are running!");
|
||||
println!("Cargo is reporting {}, however that may not be true.", built_info::PKG_VERSION);
|
||||
}
|
||||
println!("I have been built on {} for {}.", built_info::HOST, built_info::TARGET);
|
||||
}
|
||||
|
||||
fn load_macro(set: String, mac: String, inputs: String, vars: Vec<String>) -> String {
|
||||
|
@ -105,7 +111,6 @@ fn parse(code: String) -> String {
|
|||
// blocks[1] = User-defined macros [TODO]
|
||||
// blocks[2] = Zero page
|
||||
// blocks[3] = Main code block
|
||||
let version = "VERZON"; // don't touch this ever.
|
||||
let mut vars: Vec<String> = [].to_vec(); // Variables and vectors in order.
|
||||
let mut blocks: Vec<String> = ["".to_string(), "".to_string(), "".to_string(), "".to_string()].to_vec();
|
||||
let replaced = code.replace("\n\n", "\n");
|
||||
|
|
Reference in a new issue