mirror of
https://github.com/ntrupin/abstractml.git
synced 2026-01-26 06:59:26 -06:00
Deleted precompiler
This commit is contained in:
4
experimental/precompiler/Cargo.lock
generated
4
experimental/precompiler/Cargo.lock
generated
@@ -1,4 +0,0 @@
|
||||
[[package]]
|
||||
name = "precompiler"
|
||||
version = "0.1.0"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
[package]
|
||||
name = "precompiler"
|
||||
version = "0.1.0"
|
||||
authors = ["ntrupin <ntrupin@ntrupin.com>"]
|
||||
|
||||
[dependencies]
|
||||
@@ -1,43 +0,0 @@
|
||||
fn main() {
|
||||
let parts: Vec<&str> = "charset -> utf-8\nmeta -> viewport -> width=device-width, initial-scale=1\nlink -> stylesheet -> index.css\ntitle -> Hello, World!\ndiv\nh1 -> Example Domain\np -> This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.\na -> href='http://www.iana.org/domains/example' -> More information...\nend -> div"
|
||||
.trim()
|
||||
.split("\n")
|
||||
.collect();
|
||||
for part in parts {
|
||||
let seg: Vec<&str> = part
|
||||
.trim()
|
||||
.split(" -> ")
|
||||
.collect();
|
||||
if seg.len() == 3 {
|
||||
let (tag, args, inner) = (seg[0], seg[1], seg[2]);
|
||||
match tag {
|
||||
"h1"|"h2"|"h3"|"h4"|"h5"|"h6"|"p"|"a"|"abbr"|"button"|"li" => {
|
||||
match inner {
|
||||
"noend"|"."|" " => println!("<{} {}>", tag, args),
|
||||
_ => println!("<{} {}>{}</{}>", tag, args, inner, tag)
|
||||
}
|
||||
},
|
||||
"div"|"span"|"center"|"header"|"nav"|"main"|"form"|"table"|"th"|"tr"|"td" =>
|
||||
match inner {
|
||||
"end"|"."|" " => println!("<{} {}></{}>", tag, args, tag),
|
||||
_ => println!("<{} {}>{}", tag, args, inner)
|
||||
}
|
||||
_ => println!("{}", tag)
|
||||
}
|
||||
} if seg.len() == 2 {
|
||||
let (tag, args) = (seg[0], seg[1]);
|
||||
match tag {
|
||||
"h1"|"h2"|"h3"|"h4"|"h5"|"h6"|"p"|"a"|"abbr"|"button"|"li" => println!("<{}>{}</{}>", tag, args, tag),
|
||||
"div"|"span"|"center"|"header"|"nav"|"main"|"form"|"table"|"th"|"tr"|"td" => println!("<{} {}>", tag, args),
|
||||
"end" => println!("</{}>", args),
|
||||
_ => println!("{}", tag)
|
||||
}
|
||||
} else {
|
||||
let tag = seg[0];
|
||||
match tag {
|
||||
"h1"|"h2"|"h3"|"h4"|"h5"|"h6"|"p"|"a"|"abbr"|"button"|"li"|"div"|"span"|"center"|"header"|"nav"|"main"|"form"|"table"|"th"|"tr"|"td" => println!("<{}>", tag),
|
||||
_ => println!("{}", tag)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
fn main() {
|
||||
let parts: Vec<&str> = "charset -> utf-8\nmeta -> viewport -> width=device-width, initial-scale=1\nlink -> stylesheet -> index.css\ntitle -> Hello, World!\ndiv\nh1 -> Example Domain\np -> This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.\na -> href='http://www.iana.org/domains/example' -> More information...\nend -> div"
|
||||
.trim()
|
||||
.split("\n")
|
||||
.collect();
|
||||
for part in parts {
|
||||
let seg: Vec<&str> = part
|
||||
.trim()
|
||||
.split(" -> ")
|
||||
.collect();
|
||||
if seg.len() == 3 {
|
||||
let (tag, args, inner) = (seg[0], seg[1], seg[2]);
|
||||
match tag {
|
||||
"h1"|"h2"|"h3"|"h4"|"h5"|"h6"|"p"|"a"|"abbr"|"button"|"li" => {
|
||||
match inner {
|
||||
"noend"|"."|" " => println!("<{} {}>", tag, args),
|
||||
_ => println!("<{} {}>{}</{}>", tag, args, inner, tag)
|
||||
}
|
||||
},
|
||||
"div"|"span"|"center"|"header"|"nav"|"main"|"form"|"table"|"th"|"tr"|"td" =>
|
||||
match inner {
|
||||
"end"|"."|" " => println!("<{} {}></{}>", tag, args, tag),
|
||||
_ => println!("<{} {}>{}", tag, args, inner)
|
||||
}
|
||||
_ => println!("{}", tag)
|
||||
}
|
||||
} if seg.len() == 2 {
|
||||
let (tag, args) = (seg[0], seg[1]);
|
||||
match tag {
|
||||
"h1"|"h2"|"h3"|"h4"|"h5"|"h6"|"p"|"a"|"abbr"|"button"|"li" => println!("<{}>{}</{}>", tag, args, tag),
|
||||
"div"|"span"|"center"|"header"|"nav"|"main"|"form"|"table"|"th"|"tr"|"td" => println!("<{} {}>", tag, args),
|
||||
"end" => println!("</{}>", args),
|
||||
_ => println!("{}", tag)
|
||||
}
|
||||
} else {
|
||||
let tag = seg[0];
|
||||
match tag {
|
||||
"h1"|"h2"|"h3"|"h4"|"h5"|"h6"|"p"|"a"|"abbr"|"button"|"li"|"div"|"span"|"center"|"header"|"nav"|"main"|"form"|"table"|"th"|"tr"|"td" => println!("<{}>", tag),
|
||||
_ => println!("{}", tag)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{"rustc_fingerprint":16333252844011932429,"outputs":{"1617349019360157463":["___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\ntrup\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\nwindows\n",""],"1164083562126845933":["rustc 1.29.2 (17a9dc751 2018-10-05)\nbinary: rustc\ncommit-hash: 17a9dc7513b9fea883dc9505f09f97c63d1d601b\ncommit-date: 2018-10-05\nhost: x86_64-pc-windows-msvc\nrelease: 1.29.2\nLLVM version: 7.0\n",""],"1464629490410732173":["___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\ntrup\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\nwindows\n",""]}}
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
2214fbc1a6425427
|
||||
@@ -1 +0,0 @@
|
||||
{"rustc":18195376587073957235,"features":"[]","target":5074940809286313572,"profile":16276118714402656289,"path":1036222786711178230,"deps":[],"local":[{"MtimeBased":[[1540378758,8165300],".fingerprint\\precompiler-c0c37d12c74f2ea7\\dep-bin-precompiler-c0c37d12c74f2ea7"]}],"rustflags":[],"edition":"Edition2015"}
|
||||
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
C:\Users\ntrup\projects\precompiler\target\debug\deps\precompiler-c0c37d12c74f2ea7.exe: src\main.rs
|
||||
|
||||
C:\Users\ntrup\projects\precompiler\target\debug\deps\precompiler-c0c37d12c74f2ea7.d: src\main.rs
|
||||
|
||||
src\main.rs:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
C:\Users\ntrup\projects\precompiler\target\debug\precompiler.pdb: C:\Users\ntrup\projects\precompiler\src\main.rs
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user