Module: ScaleRb::Metadata::TypeExp

Defined in:
lib/scale_rb/metadata/type_exp.rb

Defined Under Namespace

Classes: ArrayType, NamedType, Tokenizer, TupleType, TypeExpParser

Class Method Summary collapse

Class Method Details

.parse(type_exp) ⇒ Object

% parse

String -> NamedType | ArrayType | TupleType



107
108
109
# File 'lib/scale_rb/metadata/type_exp.rb', line 107

def self.parse(type_exp)
  TypeExpParser.new(type_exp).parse
end
% print

NamedType | ArrayType | TupleType -> String



102
103
104
# File 'lib/scale_rb/metadata/type_exp.rb', line 102

def self.print(type)
  type.to_s
end