forked from clojure/clojure-clr
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/clojure/clojure-clr
Conflicts: Clojure/Clojure/Lib/RT.cs
- Loading branch information
Showing
49 changed files
with
2,902 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
; Copyright (c) Rich Hickey. All rights reserved. | ||
; The use and distribution terms for this software are covered by the | ||
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) | ||
; which can be found in the file epl-v10.html at the root of this distribution. | ||
; By using this software in any fashion, you are agreeing to be bound by | ||
; the terms of this license. | ||
; You must not remove this notice, or any other, from this software. | ||
|
||
(ns ^{:doc "edn reading." | ||
:author "Rich Hickey"} | ||
clojure.edn | ||
(:refer-clojure :exclude [read read-string])) | ||
|
||
(defn read | ||
"Reads the next object from stream, which must be an instance of | ||
java.io.PushbackReader or some derivee. stream defaults to the | ||
current value of *in*. | ||
Reads data in the edn format (subset of Clojure data): | ||
http://edn-format.org | ||
opts is a map that can include the following keys: | ||
:eof - value to return on end-of-file. When not supplied, eof throws an exception. | ||
:readers - a map of tag symbols to data-reader functions to be considered before default-data-readers. | ||
When not supplied, only the default-data-readers will be used. | ||
:default - A function of two args, that will, if present and no reader is found for a tag, | ||
be called with the tag and the value." | ||
|
||
{:added "1.5"} | ||
([] | ||
(read *in*)) | ||
([stream] | ||
(read {} stream)) | ||
([opts stream] | ||
(clojure.lang.EdnReader/read stream opts))) | ||
|
||
(defn read-string | ||
"Reads one object from the string s. Returns nil when s is nil or empty. | ||
Reads data in the edn format (subset of Clojure data): | ||
http://edn-format.org | ||
opts is a map as per clojure.edn/read" | ||
{:added "1.5"} | ||
([s] (read-string {:eof nil} s)) | ||
([opts s] (when s (clojure.lang.EdnReader/readString s opts)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.