Run some improvements to the code

This commit is contained in:
abbie 2022-01-29 09:43:56 +00:00
parent 9f5c78ca64
commit a539eb6ff1
No known key found for this signature in database
GPG key ID: 04DDE463F9200F87
3 changed files with 17 additions and 9 deletions

13
README
View file

@ -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.

View file

@ -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")
}

View file

@ -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");