Module: Qrb::Syntax::LambdaExpr

Defined in:
lib/qrb/syntax/lambda_expr.rb

Instance Method Summary collapse

Instance Method Details

#compile(factory) ⇒ Object



5
6
7
# File 'lib/qrb/syntax/lambda_expr.rb', line 5

def compile(factory)
  expression.compile(var_name)
end

#to_astObject



9
10
11
# File 'lib/qrb/syntax/lambda_expr.rb', line 9

def to_ast
  [:fn, [:parameters, var_name.to_s], [:source, expression.to_s.strip]]
end