Module: Jade::Frontend::SemanticAnalysis::InterfaceDeclaration
- Extended by:
- Helper, InterfaceDeclaration
- Included in:
- InterfaceDeclaration
- Defined in:
- lib/jade/frontend/semantic_analysis/interface_declaration.rb
Instance Method Summary collapse
Methods included from Helper
analyze_duplicate_fields, analyze_in_parallel, analyze_in_sequence, analyze_node, bind, collect_vars, lookup, validate_type_symbol
Instance Method Details
#analyze(node, registry, scope, entry) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jade/frontend/semantic_analysis/interface_declaration.rb', line 8 def analyze(node, registry, scope, entry) node => AST::InterfaceDeclaration(name:) symbol_ref = entry.lookup_type(name).to_ref interface = registry.lookup(symbol_ref) Result .init(node.with(symbol: symbol_ref), scope) .add_errors( interface.functions.flat_map { validate_type_symbol(it, registry, entry) } + validate_type_param_used(interface, registry, entry), ) end |