Skip to content

Commit

Permalink
updated recommended version in README, added reflection warnings, and…
Browse files Browse the repository at this point in the history
… type hints

Closes #12, Closes #14
  • Loading branch information
Nate Young committed Sep 19, 2012
1 parent 454d635 commit fe6dd4b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ forms in order, but "throws away" all but the value of the last form.

## Installation

You can use The Parsatron by including `[the/parsatron "0.0.1"]` in your `project.clj` dependencies.
You can use The Parsatron by including `[the/parsatron "0.0.3"]` in your `project.clj` dependencies.
It's available for download from Clojars.

## License
Expand Down
4 changes: 3 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(defproject the/parsatron "0.0.4-SNAPSHOT"
:description "Clojure parser combinators"
:dependencies [[org.clojure/clojure "1.3.0"]]
:dev-dependencies [[swank-clojure "1.4.2"]])
:dev-dependencies [[swank-clojure "1.4.2"]]

:warn-on-reflection true)
6 changes: 3 additions & 3 deletions src/the/parsatron.clj
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@
(defn digit
"Consume a digit [0-9] character"
[]
(token #(Character/isDigit %)))
(token #(Character/isDigit ^Character %)))

(defn letter
"Consume a letter [a-zA-Z] character"
[]
(token #(Character/isLetter %)))
(token #(Character/isLetter ^Character %)))

(defn string
"Consume the given string"
Expand Down Expand Up @@ -288,4 +288,4 @@
(let [result (run-parser p (InputState. input (SourcePos. 1 1)))]
(condp instance? result
Ok (:item result)
Err (throw (RuntimeException. (:errmsg result))))))
Err (throw (RuntimeException. ^String (:errmsg result))))))

0 comments on commit fe6dd4b

Please sign in to comment.