This commit is contained in:
elkowar 2021-07-05 20:42:45 +02:00
parent b6a6188b8a
commit 641796d38f
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
2 changed files with 3 additions and 1 deletions

View file

@ -3,7 +3,7 @@ use eww_config::{config::*, expr::*};
fn main() {
let mut files = codespan_reporting::files::SimpleFiles::new();
let input = "(12 :bar 22 (foo) (baz)";
let input = "(12 :bar 22 (foo) (baz))";
let file_id = files.add("foo.eww", input);
let ast = eww_config::parse_string(file_id, input);

View file

@ -66,6 +66,8 @@ impl Expr {
as_func!(ExprType::Symbol, as_symbol as_symbol_ref<String> = Expr::Symbol(_, x) => x);
as_func!(ExprType::Keyword, as_keyword as_keyword_ref<String> = Expr::Keyword(_, x) => x);
as_func!(ExprType::List, as_list as_list_ref<Vec<Expr>> = Expr::List(_, x) => x);
pub fn expr_type(&self) -> ExprType {