voidc

One compiler pipeline.
Builds and tooling share it.

VOID source is parsed, specialized/lowered, semantically analyzed, lowered to C, and compiled natively. The same front end now powers voidc check and persistent semantic tooling queries without duplicating language rules.

Compiler architecture

Language intelligence stays in voidc.

The compiler owns source spans, AST, semantic bindings, constructor/interface/property/event/delegate semantics, generic inference and specialization, extension binding, pattern analysis and switch lowering, iterator/disposal lowering, nullability, initialization rules, runtime/GC lowering, native ABI handling, and code generation. Tooling reuses that state instead of creating a second parser or binder.

VOID sourcetokens + source spans
Parse & lowerAST, generics, iterators
Semantic modeltypes, symbols, calls
Generated Cruntime + #line mappings
Native binarysystem compiler/linker

Object model lowering

Constructor chains, inherited interface contracts, struct-to-interface boxing, virtual property dispatch, field-like/custom event accessors, completed delegate targets/equality, expression-bodied members, generic constraints, and target-typed conditional expressions all lower through the same compiler-owned semantic model.

Receiver & generic calls

Temporary/property/indexer/array/conditional receivers reuse the normal call and GC-root paths, while explicit generic method specialization still hands overload selection, access, named/default/params, readonly checks, and virtual/interface dispatch back to the ordinary call resolver.

Value types, arrays & control flow

Nested/readonly value layouts, jagged and rectangular arrays with explicit or inferred initializer shapes, null-conditional indexing, do/while, closure frames, by-reference capture, iterator state/local semantics, and compound indexer/swizzle targets lower through the same compiler-owned type and GC model.

Pattern analysis & switch lowering

Declaration/property/recursive patterns reuse normal type relationships, property access, conversions, definite assignment, and GC-safe temporaries. Pattern switches, guards, and switch expressions share that matcher and preserve deterministic first-match ordering.

Inference & extension binding

Generic method inference and extension methods flow through the normal overload resolver and monomorphizer instead of a separate call path. Ordinary instance members keep precedence.

Advanced interface lowering

Static interface contracts, constrained static calls, and default interface methods extend the existing interface model and specialize to concrete calls/dispatch where appropriate.

Nullability & initialization

Nullable value storage, lifted operations, named/default arguments, instance/object/array/collection initializers, static members, and deterministic type initialization lower through the same semantic model.

voidc check

Runs the complete compiler front end and diagnostics, then deliberately stops before C generation, output creation, or native compilation.

Semantic query sessions

A persistent analyzed project can answer symbol, type, definition, member, and callable-parameter questions through the public compiler query API.

Ranged diagnostics

Lexer, parser, and semantic failures share one diagnostic representation with source path and end-exclusive source span.

Debug/source mapping

Debug C output emits standard #line directives. GCC/Clang then place original VOID filenames and lines in normal native debug information.

voidc lsp

The compiler hosts the LSP lifecycle and document state, publishes live diagnostics, serves hover/signature help and semantic completion, resolves definitions/references/symbols, and analyzes every open project document from one synchronized in-memory snapshot.

Operator binding & generic provenance

Unary/binary operators, static-interface operator contracts, and constrained generic dispatch are bound semantically before lowering. Iterator promotion preserves generic origin/constraint metadata so valid generic operations remain valid after suspension.

Native ABI

Unsafe declarations, pointers, ABI structs, callbacks including ref/out/in callback parameters, exported library entry points, memory primitives, and native dependencies lower directly through the C boundary.

Executable & library output

The same project/compiler pipeline can emit native executables or static archives. [Export] methods seed reachability and gain stable C wrappers while internal VOID implementations stay private.

One compiler model

The full editor stack reuses normal compilation semantics.

Source ranges, checking, bindings, overload selection, access rules, source mapping, completion, navigation, and references all remain compiler-owned. voidc lsp is a protocol layer over that model, not a second language implementation. The completed integration path also keeps simultaneous unsaved edits across multiple files consistent, recovers cleanly after temporarily broken source, and falls back to disk when an edited dependency closes. A future editor extension can stay a thin client around this server.