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.
87 88 89 90 91 92 93 94 |
# File 'lib/iode/reader.rb', line 87 def read(source) progn = parse(source) if progn.length > 1 [:progn, *progn] else progn.first end end |