compiler: Remove Too-Early Instatiation Reference (2)
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -273,25 +273,6 @@ public struct SpecialCompilers {
|
|||||||
|
|
||||||
// If none of the declaration parsers chose to parse, that's an error, too!
|
// If none of the declaration parsers chose to parse, that's an error, too!
|
||||||
if !found_parser {
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let no_parser_error = ErrorWithLocation(
|
let no_parser_error = ErrorWithLocation(
|
||||||
sourceLocation: specific_declaration_node.toSourceLocation(),
|
sourceLocation: specific_declaration_node.toSourceLocation(),
|
||||||
withError: "Could not find parser for declaration node"
|
withError: "Could not find parser for declaration node"
|
||||||
@@ -304,7 +285,6 @@ public struct SpecialCompilers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if let errors = errors {
|
if let errors = errors {
|
||||||
return .Error(errors)
|
return .Error(errors)
|
||||||
|
|||||||
Reference in New Issue
Block a user