Class: Clojure::Parser
- Inherits:
-
Object
- Object
- Clojure::Parser
- Defined in:
- lib/clj/parser.rb,
ext/clj/parser.c
Constant Summary collapse
- NUMBERS =
'0' .. '9'
- UNICODE_REGEX =
/[0-9|a-f|A-F]{4}/
- OCTAL_REGEX =
/[0-3]?[0-7]?[0-7]/
Instance Method Summary collapse
-
#initialize(source, options = {}) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(source, options = {}) ⇒ Parser
Returns a new instance of Parser.
463 464 465 466 467 468 469 470 471 |
# File 'ext/clj/parser.c', line 463 def initialize (source, = {}) @source = source.is_a?(String) ? StringIO.new(source) : source @options = @map_class = [:map_class] || Clojure::Map @vector_class = [:vector_class] || Clojure::Vector @list_class = [:list_class] || Clojure::List @set_class = [:set_class] || Clojure::Set end |
Instance Method Details
#parse ⇒ Object
517 518 519 |
# File 'ext/clj/parser.c', line 517 def parse read_next end |