Skip to content

Update polserver and read scope_tree through a pointer - #132

Draft
turleypol wants to merge 1 commit into
masterfrom
ecompile-diagnostics-merge
Draft

turleypol wants to merge 1 commit into
masterfrom
ecompile-diagnostics-merge

Conversation

@turleypol

@turleypol turleypol commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Moves native/polserver to , the head of
ecompile-diagnostics-140b0dc4 after polserver/polserver#988. That
PR keeps master's compiler behaviour outside
Compiler::analyze(). It also stores
CompilerWorkspace::scope_tree as a std::unique_ptr that
only analysis mode creates.

The language server only reaches the workspace through
analyze(), so the tree always exists. The five files that
read it now use workspace.scope_tree-> instead of
workspace.scope_tree., with no null checks.

The polserver update also fixes a crash while typing: a
half-typed case ( elem ) 5: x segfaulted in
Disambiguator::visit_case_dispatch_group.

polserver now builds the ScopeTree only in analysis mode and
holds it
in a std::unique_ptr. Compiler::analyze() always creates it,
so the
language server reads it with -> and needs no null checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant