summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-01-13 13:02:33 +0100
committerLaurenz <laurmaedje@gmail.com>2020-01-13 13:02:33 +0100
commit6527d31dfba78330a39e52d7772f6c8561fb23ef (patch)
tree0c0640ce40d14662d21bc0cac61af4caca03f237 /tests
parenta8f711d49ad65ee08c96fae2a8b52873667bdf5c (diff)
Merge Characters struct into tokenizer 🔀
Diffstat (limited to 'tests')
-rw-r--r--tests/parse.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/parse.rs b/tests/parse.rs
index 14a5b22d..02c4f9b7 100644
--- a/tests/parse.rs
+++ b/tests/parse.rs
@@ -9,18 +9,12 @@ use Token::{
LeftBracket as LB, RightBracket as RB,
LeftParen as LP, RightParen as RP,
LeftBrace as LBR, RightBrace as RBR,
- Colon as CL, Comma as CM, Equals as EQ, Expr as E,
+ Colon as CL, Comma as CM, Equals as EQ,
+ ExprIdent as ID, ExprString as STR, ExprSize as SIZE,
+ ExprNumber as NUM, ExprBool as BOOL,
Star as ST, Underscore as U, Backtick as B, Text as T,
};
-use Expression as Expr;
-fn ID(ident: &str) -> Token { E(Expr::Ident(Ident::new(ident.to_string()).unwrap())) }
-fn STR(ident: &str) -> Token { E(Expr::Str(ident.to_string())) }
-fn SIZE(size: Size) -> Token<'static> { E(Expr::Size(size)) }
-fn NUM(num: f64) -> Token<'static> { E(Expr::Num(num)) }
-fn BOOL(b: bool) -> Token<'static> { E(Expr::Bool(b)) }
-
-
/// Parses the test syntax.
macro_rules! tokens {
($($task:ident $src:expr =>($line:expr)=> [$($target:tt)*])*) => ({