class SFRP::Poly::DSL::TConstProxy

Public Class Methods

new(tconst_str, var_strs, infinite) click to toggle source
# File lib/sfrp/poly/dsl.rb, line 64
def initialize(tconst_str, var_strs, infinite)
  args = var_strs.map { |v| TypeAnnotationVar.new(v) }
  @ret_type_annot = TypeAnnotationType.new(tconst_str, args)
  @var_strs = var_strs
  @infinite = infinite
  @vconst_strs = []
end

Public Instance Methods

vconst(vconst_str, arg_type_annots, native_str = nil) click to toggle source
# File lib/sfrp/poly/dsl.rb, line 72
def vconst(vconst_str, arg_type_annots, native_str = nil)
  ftype_annot = FuncTypeAnnotation.new(@ret_type_annot, arg_type_annots)
  @vconst_strs << vconst_str
  VConst.new(vconst_str, @var_strs, ftype_annot, native_str)
end
vconst_strs() click to toggle source
# File lib/sfrp/poly/dsl.rb, line 78
def vconst_strs
  @infinite ? nil : @vconst_strs
end