Skip to content

Commit 1877711

Browse files
committed
Start implementing a parser
Implement parsing text, variables and arguments. Start implementing parsing filters. Stub out parsing tags.
1 parent 1546aea commit 1877711

File tree

5 files changed

+435
-4
lines changed

5 files changed

+435
-4
lines changed

Cargo.lock

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ crate-type = ["cdylib"]
1010

1111
[dependencies]
1212
miette = { version = "7.2.0", features = ["fancy"] }
13-
pyo3 = "0.22.0"
13+
num-bigint = "0.4.6"
14+
pyo3 = { version = "0.22.0", features = ["num-bigint"] }
1415
thiserror = "1.0.64"
1516
unicode-xid = "0.2.6"

src/lex.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ pub enum VariableTokenType {
195195

196196
#[derive(Debug, PartialEq, Eq)]
197197
pub struct VariableToken<'t> {
198-
token_type: VariableTokenType,
199-
content: &'t str,
200-
at: (usize, usize),
198+
pub token_type: VariableTokenType,
199+
pub content: &'t str,
200+
pub at: (usize, usize),
201201
}
202202

203203
enum Mode {

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
mod lex;
2+
mod parse;

0 commit comments

Comments
 (0)