Skip to content

Commit a102d87

Browse files
claude[bot]logbie
andcommitted
fix: Address minor issues in module system implementation
- Fix unused variable warning in src/parser/helpers.rs:252 with #[allow(unused_variables)] - Improve documentation in type checker for include statement limitations - Add detailed comment explaining current type checking behavior and future improvements Co-authored-by: logbie <logbie@users.noreply.github.com>
1 parent 6650c6b commit a102d87

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/parser/helpers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ impl<'a> Parser<'a> {
249249
}
250250
Token::KeywordEnd => {
251251
// Handle orphaned "end" tokens during error recovery
252+
#[allow(unused_variables)]
252253
let line = token.line;
253254
exec_trace!("Synchronizing: found 'end' token at line {}", line);
254255
self.bump_sync();

src/typechecker/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,10 @@ impl TypeChecker {
16881688
);
16891689
}
16901690
// Note: Include statements execute in parent scope, making their symbols available
1691-
// Full symbol resolution would require parsing the included file during type checking
1691+
// at runtime. However, the type checker doesn't currently parse included files,
1692+
// which can result in false "not found" errors for symbols defined in included files.
1693+
// Future improvement: Parse and analyze included files during type checking
1694+
// to register their symbols in the current scope for more accurate diagnostics.
16921695
}
16931696

16941697
Statement::ExportStatement {

0 commit comments

Comments
 (0)