Import files from folders above: import ..a.b, import ...a.b
Leading dots go up one folder less than their count (.. is one up, ... is two). The language server index and formatter understand them, and a missing file is reported with its real path. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9b496a7b03
commit
910bde692a
11 files changed
+139
-8
No files matched your search
@@ -115,6 +115,7 @@ var s: Shape = Circle{1.0}
|
||||
```rex
|
||||
import utils // utils.rex next to this file
|
||||
import tools.fs // tools/fs.rex, used as fs.name
|
||||
import ..shared // ../shared.rex (...x = two folders up)
|
||||
import os // built-in: os math time
|
||||
pub func f() {} // visible to other files
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user