Skip to content
Browse files

updated recommended version in README, added reflection warnings, and…

… type hints

Closes #12, Closes #14
  • Loading branch information...
1 parent 454d635 commit fe6dd4b1bfb70d619db4b5a56068c8908ff485bd @youngnh committed Sep 19, 2012
Showing with 7 additions and 5 deletions.
  1. +1 −1 README.md
  2. +3 −1 project.clj
  3. +3 −3 src/the/parsatron.clj
View
2 README.md
@@ -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
View
4 project.clj
@@ -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)
View
6 src/the/parsatron.clj
@@ -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"
@@ -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.
Something went wrong with that request. Please try again.