0.3.1: )!!/ and )../ are now supported.
This commit is contained in:
parent
f75cabab83
commit
f4c497e8a4
5 changed files with 58 additions and 7 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -120,7 +120,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lintc"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"built",
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "lintc"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
|
|
4
README
4
README
|
@ -14,10 +14,10 @@ Latest release and setup
|
|||
----------------------------
|
||||
Clone this repository to get the latest development version.
|
||||
|
||||
Currently we are at version 0.3.0 of the software.
|
||||
Currently we are at version 0.3.1 of the software.
|
||||
|
||||
If you'd like the point release (stable) version, run these commands below:
|
||||
git reset --hard 0.3.0
|
||||
git reset --hard 0.3.1
|
||||
cargo build --release
|
||||
|
||||
If you want the latest development release, run these commands:
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
<h2>Latest release and setup</h2>
|
||||
<p>Clone this repository to get the latest development version.</p>
|
||||
|
||||
<p>Currently we are at version 0.3.0 of the software.</p>
|
||||
<p>Currently we are at version 0.3.1 of the software.</p>
|
||||
|
||||
<p>If you'd like the point release (stable) version, run these commands below:</p>
|
||||
<pre>git reset --hard 0.3.0
|
||||
<pre>git reset --hard 0.3.1
|
||||
|
||||
cargo build --release</pre>
|
||||
|
||||
|
|
53
src/main.rs
53
src/main.rs
|
@ -97,7 +97,6 @@ fn load_macro(set: String, mac: String, inputs: String, vars: Vec<String>) -> St
|
|||
}
|
||||
|
||||
if inputs.contains(")/") {
|
||||
println!("e");
|
||||
let coolbeans: Vec<&str> = inputs.split(")/").collect();
|
||||
let mut isin = false;
|
||||
let mut i: u8 = 0;
|
||||
|
@ -122,6 +121,58 @@ fn load_macro(set: String, mac: String, inputs: String, vars: Vec<String>) -> St
|
|||
}
|
||||
contents = contelt.to_string();
|
||||
}
|
||||
|
||||
if inputs.contains(")!!/") {
|
||||
let coolbeans: Vec<&str> = inputs.split(")!!/").collect();
|
||||
let mut isin = false;
|
||||
let mut i: u8 = 0;
|
||||
for x in vars.to_vec() {
|
||||
if x == coolbeans[1].to_string() {
|
||||
isin = true;
|
||||
}
|
||||
if isin != true {
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
if isin != true {
|
||||
println!("ERROR: Reference to variable {} not assigned.", coolbeans[1]);
|
||||
process::exit(1);
|
||||
}
|
||||
let contunt: Vec<&str> = contents.split("\n").collect();
|
||||
let mut contelt = "".to_string();
|
||||
for x in contunt {
|
||||
if x.len() > 2 {
|
||||
contelt = format!("{}\n{} .{} STZ",contelt,x,i.to_string());
|
||||
}
|
||||
}
|
||||
contents = contelt.to_string();
|
||||
}
|
||||
|
||||
if inputs.contains(")../") {
|
||||
let coolbeans: Vec<&str> = inputs.split(")../").collect();
|
||||
let mut isin = false;
|
||||
let mut i: u8 = 0;
|
||||
for x in vars.to_vec() {
|
||||
if x == coolbeans[1].to_string() {
|
||||
isin = true;
|
||||
}
|
||||
if isin != true {
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
if isin != true {
|
||||
println!("ERROR: Reference to variable {} not assigned.", coolbeans[1]);
|
||||
process::exit(1);
|
||||
}
|
||||
let contunt: Vec<&str> = contents.split("\n").collect();
|
||||
let mut contelt = "".to_string();
|
||||
for x in contunt {
|
||||
if x.len() > 2 {
|
||||
contelt = format!("{}\n{} .{} STZ",contelt,x,i.to_string());
|
||||
}
|
||||
}
|
||||
contents = contelt.to_string();
|
||||
}
|
||||
return contents.to_string();
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue