Class: WLang::Parser
- Inherits:
-
Object
- Object
- WLang::Parser
- Defined in:
- lib/wlang/compiler/parser.rb
Instance Method Summary collapse
- #call(input) ⇒ Object
-
#initialize(options = {}) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(options = {}) ⇒ Parser
Returns a new instance of Parser.
5 6 |
# File 'lib/wlang/compiler/parser.rb', line 5 def initialize( = {}) end |
Instance Method Details
#call(input) ⇒ Object
8 9 10 11 |
# File 'lib/wlang/compiler/parser.rb', line 8 def call(input) return input if input.is_a?(Array) parser.parse(parsing_source(input)).value end |