Class: WAG::FunctionType
Instance Attribute Summary
Attributes inherited from Function
Instance Method Summary collapse
Methods inherited from Function
Methods included from Encodable
Methods included from Instructable
#f32, #f64, #i32, #i64, #local, #memory
Constructor Details
This class inherits a constructor from WAG::Function
Instance Method Details
#to_sexpr ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/wag/function_type.rb', line 5 def to_sexpr [:type].tap do |type| type.push(@label.to_sexpr) if @label [:func].tap do |func| func.concat(@params.map(&:to_sexpr)) unless @params.empty? func.push(@result.to_sexpr) if @result type.push(func) end end end |