add kw
This commit is contained in:
parent
b6a6188b8a
commit
641796d38f
2 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue