Skip to content

Commit 72d718e

Browse files
committed
fix: :xxx should be parsed as keyword instead of symbol
1 parent d138e01 commit 72d718e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bytecode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl FromStr for LispObject {
2727
} else if s == "t" {
2828
Ok(Self::T)
2929
} else if s.starts_with(":") {
30-
Ok(Self::Symbol(s[1..].to_string()))
30+
Ok(Self::Keyword(s[1..].to_string()))
3131
} else {
3232
bail!("Supported LispObject: {}", s)
3333
}

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ fn test_parse_args() {
9292
assert_eq!(cli.verbose.log_level_filter(), log::LevelFilter::Debug);
9393
assert_eq!(cli.server_cmd, vec!["server_cmd", "arg1"]);
9494
assert_eq!(cli.json_object_type, bytecode::ObjectType::Hashtable);
95-
assert_eq!(cli.json_null_value, bytecode::LispObject::Symbol("null".into()));
96-
assert_eq!(cli.json_false_value, bytecode::LispObject::Symbol("json-false".into()));
95+
assert_eq!(cli.json_null_value, bytecode::LispObject::Keyword("null".into()));
96+
assert_eq!(cli.json_false_value, bytecode::LispObject::Keyword("json-false".into()));
9797
}

0 commit comments

Comments
 (0)