Skip to content

Commit 09e24f7

Browse files
committed
Resolve variables entirely within AstBuilder
1 parent fa80142 commit 09e24f7

38 files changed

Lines changed: 1282 additions & 1814 deletions

docs/modules/style-guide/pages/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Too many lines separate `foo` and `baz`.
193193
Properties that override an existing property shouldn't have doc comments nor type annotations,
194194
unless the type is intentionally overridden via `extends`.
195195

196-
[source%tested,{pkl}]
196+
[source%parsed,{pkl}]
197197
----
198198
amends "myOtherModule.pkl"
199199

pkl-core/src/main/java/org/pkl/core/ast/builder/AstBuilder.java

Lines changed: 304 additions & 228 deletions
Large diffs are not rendered by default.

pkl-core/src/main/java/org/pkl/core/ast/builder/MethodResolution.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@
1515
*/
1616
package org.pkl.core.ast.builder;
1717

18-
import org.pkl.core.ast.ExpressionNode;
19-
import org.pkl.core.ast.member.ClassMethod;
20-
2118
public sealed interface MethodResolution {
19+
record ImplicitBaseMethod() implements MethodResolution {}
2220

23-
record DirectMethod(ClassMethod method, ExpressionNode receiver, boolean isBase)
21+
record LexicalMethod(
22+
boolean isObjectMethod,
23+
boolean isOnClosedClass,
24+
boolean isModuleScope,
25+
boolean isLocal,
26+
int levelsUp)
2427
implements MethodResolution {}
2528

26-
record LexicalMethod(boolean isConst) implements MethodResolution {}
27-
28-
record VirtualMethod(boolean isConst) implements MethodResolution {}
29+
record ImplicitThisMethod() implements MethodResolution {}
2930
}

0 commit comments

Comments
 (0)