mirror of
https://github.com/kanaka/mal.git
synced 2024-10-05 18:08:55 +03:00
ada: allow keyword argument for keyword core function
This commit is contained in:
parent
de68c38029
commit
e3c98eeb3a
@ -563,7 +563,18 @@ package body Core is
|
||||
|
||||
Sym_Handle := Car (Rest_List);
|
||||
|
||||
return New_Symbol_Mal_Type (':' & Deref_String (Sym_Handle).Get_String);
|
||||
case Deref (Sym_Handle).Sym_Type is
|
||||
when Str =>
|
||||
return New_Symbol_Mal_Type (':' & Deref_String (Sym_Handle).Get_String);
|
||||
when Sym =>
|
||||
if Deref_Sym (Sym_Handle).Get_Sym (1) = ':' then
|
||||
return Sym_Handle;
|
||||
end if;
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
|
||||
raise Runtime_Exception with "keyword: expects a keyword or string";
|
||||
|
||||
end Keyword;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user