Class: Expressir::Express::Builders::DeclarationBuilder
- Inherits:
-
Object
- Object
- Expressir::Express::Builders::DeclarationBuilder
- Defined in:
- lib/expressir/express/builders/declaration_builder.rb
Overview
Builds declaration nodes - dispatches to specific declaration type.
Instance Method Summary collapse
Instance Method Details
#call(ast_data) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/expressir/express/builders/declaration_builder.rb', line 8 def call(ast_data) %i[entity_decl function_decl procedure_decl subtype_constraint_decl type_decl].each do |key| if ast_data[key] return Builder.build({ key => ast_data[key] }) end end nil end |