Skip to content

Commit fe1dbb5

Browse files
committed
Improve error reporting in cyclic imports parser
1 parent d5ecf78 commit fe1dbb5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/parser.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ impl Parser {
370370
let module_loc = self.lexer.location.clone();
371371
self.lexer.consume(Token::Identifier)?;
372372

373-
// TODO: Colon location in error reporting is incorrect. (#testit)
374373
if !self.lexer.is_token(Token::Colon) {
375374
Err(QccErrorKind::ExpectedColon)?
376375
}
@@ -907,7 +906,7 @@ impl Parser {
907906
// TODO: Improve information. Only return ParseError!
908907
// Here and in the cyclic import case as well.
909908
let err: QccError = QccErrorKind::UnknownImport.into();
910-
err.report(&function);
909+
qcceprintln!("{} '{}' in module '{}'", err, function, module);
911910
Err(QccErrorKind::ParseError)?
912911
}
913912
}
@@ -917,10 +916,6 @@ impl Parser {
917916
// TODO: This should be moved to an AST optimizing module.
918917
// Add function stubs for aliases
919918
for alias in aliases {
920-
// let AliasAST(ref alias, ref to_alias) = alias;
921-
// let name = alias.name();
922-
// let location = alias.location();
923-
924919
let mut stub: Option<FunctionAST> = None;
925920

926921
// Search for module in the same module

0 commit comments

Comments
 (0)