replace leading _ for private symbols with keyword hide
This commit is contained in:
@@ -177,6 +177,15 @@ mem :: import "@std/mem"
|
||||
value :: math.sum(other_math.value, 1)
|
||||
```
|
||||
|
||||
Top-level declarations are public by default. Prefix a declaration with `hide`
|
||||
to keep it local to its source file; leading underscores have no visibility
|
||||
meaning. Imports are always file-local and cannot be hidden or re-exported:
|
||||
|
||||
```bro
|
||||
hide helper func() i32 { return 42 }
|
||||
hide State :: struct { value i32 }
|
||||
```
|
||||
|
||||
Current prototype features:
|
||||
|
||||
- Newline-terminated, multiline statements; `}` may terminate a block's final statement
|
||||
|
||||
Reference in New Issue
Block a user