From: Bryan English Date: Sat, 31 Jan 2026 03:52:58 +0000 (-0500) Subject: fix imports and exports X-Git-Url: https://rethought.computer/gitweb//gitweb//git?a=commitdiff_plain;h=43abaa22299b7b1730c1d56312410d1bca7318aa;p=sorel-lang.git fix imports and exports --- diff --git a/rel-lang/relc/src/parser.rs b/rel-lang/relc/src/parser.rs index a5a95ee..3214139 100644 --- a/rel-lang/relc/src/parser.rs +++ b/rel-lang/relc/src/parser.rs @@ -67,6 +67,7 @@ impl<'a> Module<'a> { } else { if last_was_export { exports.push(word); + last_was_export = false; } else { main.push(token.clone()); } @@ -75,6 +76,7 @@ impl<'a> Module<'a> { Token::String(string) => { if last_was_import { imports.push(string); + last_was_import = false; } else { main.push(token.clone()); } @@ -96,7 +98,7 @@ impl<'a> Module<'a> { instructions: main, }); } - + Ok(Module { words: result, imports, exports }) }