feat: allow zero or multiple imported names in import statement
Make the `for` clause in import statements optional, and support comma-separated lists of imported names when present. This removes the previous restriction of exactly one imported variable per import statement. - Refactor `import()` in compiler to handle optional `for` clause with loop over comma-separated names - Update existing tests to use comma-separated imports and omit `for` clause where appropriate - Add new tests: `inside_block`, `name_collision`, `no_variable`
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
// TODO: Use comma-separated list.
|
||||
import "module" for Module
|
||||
import "module" for Other
|
||||
import "module" for Module, Other
|
||||
|
||||
IO.print(Module) // expect: before
|
||||
|
||||
|
||||
Reference in New Issue
Block a user