feat(lang): a module's private records and events are its own
A property or event a module does not export no longer collides with another module's of the same spelling: each private one is renamed for its module, with the types, new, emit and @On written in that module. Exported ones stay one namespace; two events of one spelling are now refused. Generic records, entity components and component or view records stay global. Reseed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
029a1ebba2
commit
69352babfd
17 changed files with 50199 additions and 44822 deletions
15
examples/modules/kinds/hunting/index.ludic
Normal file
15
examples/modules/kinds/hunting/index.ludic
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# hunting/index.ludic - a Catch and a Landed of its own, with other fields
|
||||
module hunting
|
||||
property Catch {
|
||||
name: string = ""
|
||||
weight: float = 0.0
|
||||
}
|
||||
event Landed { name: string }
|
||||
var heard: string = ""
|
||||
@On(Landed) handler Hear { heard = heard + name }
|
||||
export function hunting_day() -> string {
|
||||
let c = new Catch
|
||||
c.name = "hare"
|
||||
emit Landed(name: c.name)
|
||||
return heard
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue