diff --git a/examples/errors.rs b/examples/errors.rs index 6476432..48e394b 100644 --- a/examples/errors.rs +++ b/examples/errors.rs @@ -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); diff --git a/src/expr.rs b/src/expr.rs index 7426359..ca67df1 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -66,6 +66,8 @@ impl Expr { as_func!(ExprType::Symbol, as_symbol as_symbol_ref = Expr::Symbol(_, x) => x); + as_func!(ExprType::Keyword, as_keyword as_keyword_ref = Expr::Keyword(_, x) => x); + as_func!(ExprType::List, as_list as_list_ref> = Expr::List(_, x) => x); pub fn expr_type(&self) -> ExprType {