Sha256: ace299c5ac222642dd3855fdea969eccb657bfe9c002e0b3fad1a5144cfaa7e8
Contents?: true
Size: 852 Bytes
Versions: 26
Compression:
Stored size: 852 Bytes
Contents
Foobara.require_project_file("type_declarations", "type_declaration_handler") module Foobara module TypeDeclarations module Handlers # TODO: we should just use the symbol instead of {type: symbol} to save space and simplify some stuff... class RegisteredTypeDeclaration < TypeDeclarationHandler def applicable?(sugary_type_declaration) strict_type_declaration = desugarize(sugary_type_declaration) return false unless strict_type_declaration.is_a?(::Hash) # we only handle case where it's a builtin type not an extension of one if strict_type_declaration.keys == [:type] type_symbol = strict_type_declaration[:type] type_registered?(type_symbol) end end def priority Priority::HIGH end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems