3 Commits

Author SHA1 Message Date
greg
bc87f8cd90 Initial work 2020-03-04 11:25:23 -08:00
greg
a0955e07dc Fix attribute 2020-02-12 22:14:21 -08:00
greg
afcb10bb72 Add random idea 2019-11-18 03:11:00 -08:00
6 changed files with 35 additions and 1 deletions

5
Cargo.lock generated
View File

@@ -461,6 +461,10 @@ dependencies = [
"autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "partis"
version = "0.1.0"
[[package]]
name = "phf"
version = "0.7.24"
@@ -739,6 +743,7 @@ name = "schala"
version = "0.1.0"
dependencies = [
"includedir_codegen 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"partis 0.1.0",
"schala-lang 0.1.0",
"schala-repl 0.1.0",
]

View File

@@ -7,6 +7,7 @@ authors = ["greg <greg.shuflin@protonmail.com>"]
schala-repl = { path = "schala-repl" }
schala-lang = { path = "schala-lang/language" }
partis = { path="partis" }
# maaru-lang = { path = "maaru" }
# rukka-lang = { path = "rukka" }
# robo-lang = { path = "robo" }

View File

@@ -16,6 +16,9 @@
}
```
-idea: what if there was something like React jsx syntas built in? i.e. a way to automatically transform some kind of markup
into a function call, cf. `<h1 prop="arg">` -> h1(prop=arg)
## General code cleanup
- I think I can restructure the parser to get rid of most instances of expect!, at least at the beginning of a rule
DONE -experiment with storing metadata via ItemIds on AST nodes (cf. https://rust-lang.github.io/rustc-guide/hir.html, https://github.com/rust-lang/rust/blob/master/src/librustc/hir/mod.rs )

9
partis/Cargo.toml Normal file
View File

@@ -0,0 +1,9 @@
[package]
name = "partis"
version = "0.1.0"
authors = ["greg <greg.shuflin@protonmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

17
partis/src/lib.rs Normal file
View File

@@ -0,0 +1,17 @@
struct ParseError { }
enum ParseResult<'a, T> {
Success(T, &'a str),
Failure(ParseError),
Incomplete,
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}

View File

@@ -1,5 +1,4 @@
#![feature(trace_macros)]
#![feature(custom_attribute)]
//#![feature(unrestricted_attribute_tokens)]
#![feature(slice_patterns, box_patterns, box_syntax)]