mirror of
https://github.com/kanaka/mal.git
synced 2024-09-20 01:57:09 +03:00
Java, Make: return nil from core readline function on EOF.
This commit is contained in:
parent
70aff0c1fe
commit
92474a1bef
@ -98,7 +98,7 @@ public class core {
|
||||
} catch (IOException e) {
|
||||
throw new MalException(new MalString(e.getMessage()));
|
||||
} catch (readline.EOFException e) {
|
||||
throw new MalException(new MalString(e.getMessage()));
|
||||
return Nil;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -60,7 +60,7 @@ str = $(call _string,$(call _pr_str_mult,$(1),,))
|
||||
prn = $(info $(call _pr_str_mult,$(1),yes, ))
|
||||
println = $(info $(subst \n,$(NEWLINE),$(call _pr_str_mult,$(1),, )))
|
||||
|
||||
readline= $(foreach res,$(call _string,$(call READLINE,"$(call str_decode,$($(1)_value))")),$(if $(READLINE_EOF),$(__nil),$(res)))
|
||||
readline= $(foreach res,$(call _string,$(call READLINE,"$(call str_decode,$($(1)_value))")),$(if $(READLINE_EOF),$(eval READLINE_EOF :=)$(__nil),$(res)))
|
||||
read_str= $(call READ_STR,$(1))
|
||||
slurp = $(call _string,$(call _read_file,$(call str_decode,$($(1)_value))))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user