move hide behind @ and specify with :
This commit is contained in:
@@ -208,14 +208,18 @@ mem :: import "@std/mem"
|
||||
value :: math.sum(other_math.value, 1)
|
||||
```
|
||||
|
||||
Top-level declarations are public by default. Prefix a declaration with bare `hide`
|
||||
to make it package-local, or spell the scope explicitly with `hide(package)` or
|
||||
`hide(file)`. Leading underscores have no visibility meaning. Imports are always
|
||||
file-local and cannot use visibility modifiers or be re-exported:
|
||||
Top-level declarations are public by default. Prefix a declaration with bare `@hide`
|
||||
to make it package-local, or spell the scope explicitly with `@hide:package` or
|
||||
`@hide:file`. The qualifier is contextual, so `hide`, `package`, and `file` remain
|
||||
available as identifiers. Imports are always file-local and cannot use visibility
|
||||
qualifiers or be re-exported:
|
||||
|
||||
```bro
|
||||
hide shared_helper func() i32 { return 42 }
|
||||
hide(file) implementation_detail func() i32 { return shared_helper() }
|
||||
@hide
|
||||
shared_helper func() i32 { return 42 }
|
||||
|
||||
@hide:file
|
||||
implementation_detail func() i32 { return shared_helper() }
|
||||
```
|
||||
|
||||
Current prototype features:
|
||||
|
||||
Reference in New Issue
Block a user