Method: TestML::Compiler::Pegex::AST#got_code_expression
- Defined in:
- lib/testml/compiler/pegex/ast.rb
#got_code_expression(list) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/testml/compiler/pegex/ast.rb', line 41 def got_code_expression(list) calls = [] calls.push(list.shift) if !list.empty? list = !list.empty? ? list.shift : [] list.each do |e| call = e[1] # XXX this is e[0] in perl calls.push(call) end return calls[0] if calls.size == 1 return TestML::Expression.new(calls) end |