Class: Iode::Reader
- Inherits:
-
Whittle::Parser
- Object
- Whittle::Parser
- Iode::Reader
- Defined in:
- lib/iode/reader.rb
Overview
Lisp reader, converting strings to lisp data structures.
Instance Method Summary collapse
-
#read(source) ⇒ Array
Read a string in as lisp data.
Instance Method Details
#read(source) ⇒ Array
Read a string in as lisp data.
93 94 95 96 97 98 99 100 |
# File 'lib/iode/reader.rb', line 93 def read(source) progn = parse(source) if progn.length > 1 [:progn, *progn] else progn.first end end |