Resolve variables at parse time (#1429)

This replaces `ResolveVariableNode` and `ResolveMethodNode` with their resolution.
When we build the truffle node tree, we determine whether names resolve to:

* lexical scope
* base module
* implicit this

Then, we use this information to directly construct the underlying nodes (`ReadPropertyNode`, `ReadLocalPropertyNode`, etc).

Additionally, `AstBuilder` determines whether the property access must be const or not.

This introduces a `BaseModuleMembers` registry, which gets generated as part of Java compilation.
This commit is contained in:
Islon Scherer
2026-05-26 23:08:20 +02:00
committed by GitHub
parent b2f005d11d
commit dbf04f6598
45 changed files with 1930 additions and 835 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ Too many lines separate `foo` and `baz`.
Properties that override an existing property shouldn't have doc comments nor type annotations,
unless the type is intentionally overridden via `extends`.
[source%tested,{pkl}]
[source%parsed,{pkl}]
----
amends "myOtherModule.pkl"