Repository navigation
feat: クラスをhydrationしメンバー呼び出しを解決 - #121
Open
milkeclair wants to merge 28 commits into
Open
milkeclair wants to merge 28 commits into
milkeclair wants to merge 28 commits into
Conversation
milkeclair
force-pushed
the
feat/class-diagnostics
branch
2 times, most recently
from
November 16, 2026 00:12
1d6de3b to
d667564
Compare
milkeclair
force-pushed
the
feat/class-diagnostics
branch
from
November 16, 2026 04:11
d667564 to
c6deb69
Compare
milkeclair
force-pushed
the
feat/class-diagnostics
branch
from
November 16, 2026 05:20
c6deb69 to
c715653
Compare
milkeclair
force-pushed
the
feat/class-diagnostics
branch
2 times, most recently
from
November 16, 2026 07:10
b08cb8e to
c5223eb
Compare
milkeclair
force-pushed
the
feat/class-diagnostics
branch
2 times, most recently
from
November 16, 2026 23:27
66fb65c to
0ca207a
Compare
milkeclair
force-pushed
the
feat/class-diagnostics
branch
4 times, most recently
from
November 17, 2026 08:41
320ae90 to
7fe3821
Compare
milkeclair
force-pushed
the
feat/class-diagnostics
branch
2 times, most recently
from
November 17, 2026 09:51
de314fb to
6bc33c6
Compare
Collect literal class members and scoped instance declarations across project files so generated methods and accessors do not raise undefined-command warnings. Preserve body diagnostics and invalidate cached resolution when class declarations change. Refs #90.
Return readonly definition and method capture states without mutating prior maps. Test declaration transitions with real AST fixtures and keep class command integration in dedicated files instead of the general diagnostics suite.
Move the existing decoder to the AST word layer so hydrators can consume it without depending on function resolution. Keep the old import as a compatibility re-export and cover literal, dynamic and prefix inputs.
Attach typed class, attribute, method and instance meaning while preserving syntax kinds and source positions. Build reusable indexes from the final AST so declaration, word and lexical-scope references stay current after immutable enrichment. Represent published, aborted and incomplete definitions separately.
Replace diagnostic-side DSL recognition with hydrated declaration and instance indexes. Return member provenance from call analysis, refresh cached contexts when AST references change, and preserve method argument ownership. Use the shared code-argument analyzer for inline method bodies and isolate embedded class bindings.
Expand semantic fields and state transitions into readable steps, share the member transition, and resolve lexical owners through the final AST index. Match the runtime reserved prefix and retain source positions, readonly data and node identity.
Use explicit semantic names, separate target and context construction, and make test setup, actions and assertions readable. Keep existing class, incremental and embedded-code cases and their resolution behavior.
Interpret bindings, attributes, method endings and publication through separate readonly transitions. Build fresh role-specific indexes without mutating input ASTs or existing indexes. Retain native declaration references and cover duplicate members and independent index reconstruction.
Use the actual runtime declarations to verify eight default public completions, opt-in access to twenty private helpers, and private-call diagnostics and definition resolution. Keep the existing provider implementation and public DSL unchanged.
Retain upstream Japanese architecture guides and restore the class-specific hydration, provenance and diagnostic sections in Japanese. Preserve source tokens, semantic behavior and the code parameter marker while translating added function comments.
Constrain class definitions to file/function ownership and member captures to actual attributes or methods, using the established discriminated-union model. Use ordinary Japanese descriptions and document current consumers without development-history wording. Keep syntax nodes, ranges and runtime behavior unchanged.
The context for an external document already includes project declarations and the document itself. Use that result directly and build generated class commands only after the context reuse check. Cover both project and local class resolution through an external document, including isolation from project callers.
milkeclair
force-pushed
the
feat/class-diagnostics
branch
from
November 17, 2026 10:52
6bc33c6 to
3ea96d7
Compare
Preserve the shared embedded-code pipeline and immutable LSP structure while integrating class hydration, final-AST indexes and diagnostic targets. Keep the upstream hydration fast paths and function discovery reuse.
Verify that the shared embedded-code result retains the class index and references its returned AST. Describe native-function providers and class diagnostics in terms of the common code-program analysis introduced on main.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
変更内容
Refs #90。ランタイムを追加する#120の上に、クラスのAST hydrationと診断を追加します。平坦なクラス定義を解釈し、元のWordと
default=の値の範囲を保持します。不正な属性と拒否された定義を公開候補から除外し、メソッド本体のマーカーと定義の終端を区別します。メソッド内の
$self.increment、$self.count.get、$self.count.setを、そのメソッドを所有するクラスの宣言に結び付けます。メソッド本体を引数で渡す場合も、共通の埋め込みコード解析から元のクラスを特定して診断位置を対応付けます。所有クラスを特定できない$selfは動的な呼び出しとして扱います。ASTを走査してクラス宣言を集めたあと、開いたままの定義を所属スコープの末尾で確定します。
selfの解決では所属クラスとメソッドを一度の探索で取得します。クラス宣言を含まない埋め込みコードでは、親のクラス宣言を再利用します。インスタンスIDを展開する呼び出しでは、同じファイルとスコープにある先行の
z.cls.newからクラスを特定します。$counter.increment、"$counter.count.set"、${counter}.count.getを解決し、クラスを特定できる場合に未定義のメンバーを報告します。counter.incrementは通常のコマンド解決へ進み、同名の関数や外部コマンドが見つからない場合は未定義として報告します。検証
selfから実メンバーのASTへの参照、存在しないメンバーの診断位置、コード引数の入れ子、通常関数のスコープ境界、既存の補完・診断を確認しました。先に#120を見ると実行時の呼び出し規則を確認できます。