diff --git a/Sources/P4Compiler/SpecialCompilers.swift b/Sources/P4Compiler/SpecialCompilers.swift index 682512d..92347eb 100644 --- a/Sources/P4Compiler/SpecialCompilers.swift +++ b/Sources/P4Compiler/SpecialCompilers.swift @@ -273,36 +273,16 @@ public struct SpecialCompilers { // If none of the declaration parsers chose to parse, that's an error, too! if !found_parser { - - print("spec: \(declaration_node)") - // Try to see if it is an instantiation! - if declaration_node.nodeType == "instantiation" { - switch Instantiation.Compile( - node: declaration_node, withContext: compilation_context) - { - case .Ok((let x, let updated_context)): - print("instantiation: \(x)") - compilation_context = updated_context - case .Error(let e): - errors = - if let errors = errors { - errors.append(error: e) - } else { - e - } + let no_parser_error = ErrorWithLocation( + sourceLocation: specific_declaration_node.toSourceLocation(), + withError: "Could not find parser for declaration node" + ) + errors = + if let errors = errors { + errors.append(error: no_parser_error) + } else { + no_parser_error } - } else { - let no_parser_error = ErrorWithLocation( - sourceLocation: specific_declaration_node.toSourceLocation(), - withError: "Could not find parser for declaration node" - ) - errors = - if let errors = errors { - errors.append(error: no_parser_error) - } else { - no_parser_error - } - } } }