cleanup: drop resolved-issue citations from src comments
Sweep all src/**.zig comments that cite resolved issues (issue NNNN / fix-NNNN / KB-N): the invariant or mechanism each comment states is kept; the historical citation is dropped, per the no-conclusion-comments rule. Pure-history parentheticals are removed outright. References to the 16 still-open issues (0030, 0041-0056) are untouched, as are test NAMES carrying regression provenance (matching the sanctioned "Regression (issue NNNN)" example-header convention). Also removes the issues/0019-import-non-transitive-c-scope/ fixture dir — the issue is superseded and its behavior is covered by examples/0706-modules-import-non-transitive.sx (the .md writeup stays). issues/0030's repro .sx stays: that issue is an open feature request. Gate: zig build OK; zig build test 426/426; run_examples 541/0; zero expected/ snapshot churn.
This commit is contained in:
64
src/ast.zig
64
src/ast.zig
@@ -132,12 +132,12 @@ pub const FnDecl = struct {
|
||||
is_arrow: bool = false,
|
||||
call_conv: CallingConvention = .default,
|
||||
/// Span of the function's name token, for the reserved-type-name decl
|
||||
/// diagnostic (issue 0089). Synthesized decls (e.g. `#import c` foreign
|
||||
/// diagnostic. Synthesized decls (e.g. `#import c` foreign
|
||||
/// functions, lowering-time objc/protocol method synthesis) leave it zero.
|
||||
name_span: Span = .{ .start = 0, .end = 0 },
|
||||
/// True when the function NAME was written as a backtick raw identifier
|
||||
/// (`` `s2 :: … ``) or synthesized by a `#import c` foreign decl. A raw
|
||||
/// name is exempt from the reserved-type-name binding check (issue 0089).
|
||||
/// name is exempt from the reserved-type-name binding check.
|
||||
/// Every PARSER fn_decl is built through `parseFnDecl`, whose `name_is_raw`
|
||||
/// is a REQUIRED parameter, so a parser site cannot drop it; the default
|
||||
/// here serves only post-check synthesized decls (which are never raw).
|
||||
@@ -161,7 +161,7 @@ pub const Param = struct {
|
||||
default_expr: ?*Node = null,
|
||||
/// True when the param name was written as a backtick raw identifier
|
||||
/// (`` `s2 ``) or synthesized by a `#import c` foreign decl. A raw name is
|
||||
/// exempt from the reserved-type-name binding check (issue 0089).
|
||||
/// exempt from the reserved-type-name binding check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -201,7 +201,7 @@ pub const Identifier = struct {
|
||||
name: []const u8,
|
||||
/// True when written as a backtick raw identifier (`` `s2 ``). Carried so a
|
||||
/// destructure target (`` `s2, b := … ``) can be recognised as raw and
|
||||
/// exempted from the reserved-type-name binding check (issue 0089).
|
||||
/// exempted from the reserved-type-name binding check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -293,7 +293,7 @@ pub const IfExpr = struct {
|
||||
binding_name: ?[]const u8 = null, // for `if val := expr { ... }` optional binding
|
||||
binding_span: ?Span = null, // span of `binding_name` (set iff `binding_name` is)
|
||||
/// True when the optional binding was a backtick raw identifier
|
||||
/// (`` if `s2 := … ``) — exempt from the reserved-type-name check (issue 0089).
|
||||
/// (`` if `s2 := … ``) — exempt from the reserved-type-name check.
|
||||
binding_is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -310,7 +310,7 @@ pub const MatchArm = struct {
|
||||
capture: ?[]const u8 = null, // payload binding name: case .variant: (name) { ... }
|
||||
capture_span: ?Span = null, // span of `capture` (set iff `capture` is)
|
||||
/// True when the capture was a backtick raw identifier
|
||||
/// (`` case .v: (`s2) ``) — exempt from the reserved-type-name check (issue 0089).
|
||||
/// (`` case .v: (`s2) ``) — exempt from the reserved-type-name check.
|
||||
capture_is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -319,14 +319,14 @@ pub const ConstDecl = struct {
|
||||
type_annotation: ?*Node,
|
||||
value: *Node,
|
||||
/// Span of the constant's name token, for the reserved-type-name decl
|
||||
/// diagnostic (issue 0089). NO default: every construction site must set
|
||||
/// diagnostic. NO default: every construction site must set
|
||||
/// it explicitly, so a struct-body const can't silently fall back to a
|
||||
/// 1:1 caret (the finding-1 bug).
|
||||
name_span: Span,
|
||||
/// True when the constant NAME was written as a backtick raw identifier
|
||||
/// (`` `s2 :: … ``). NO default: required at every site so the reserved-
|
||||
/// name exemption can't be dropped — mirrors `checkBindingName`'s required
|
||||
/// `is_raw` argument so the parser and the check can't desync (issue 0089).
|
||||
/// `is_raw` argument so the parser and the check can't desync.
|
||||
is_raw: bool,
|
||||
};
|
||||
|
||||
@@ -340,7 +340,7 @@ pub const VarDecl = struct {
|
||||
foreign_name: ?[]const u8 = null,
|
||||
/// True when the binding name was written as a backtick raw identifier
|
||||
/// (`` `s2 := … ``). A raw name is exempt from the reserved-type-name
|
||||
/// binding check (issue 0089).
|
||||
/// binding check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -374,7 +374,7 @@ pub const DestructureDecl = struct {
|
||||
name_spans: []const Span, // one per entry in `names`, same order
|
||||
/// One per entry in `names`, same order: true when that target was a
|
||||
/// backtick raw identifier (`` `s2, b := … ``) — exempt from the
|
||||
/// reserved-type-name binding check (issue 0089).
|
||||
/// reserved-type-name binding check.
|
||||
name_is_raw: []const bool,
|
||||
value: *Node,
|
||||
};
|
||||
@@ -388,7 +388,7 @@ pub const EnumDecl = struct {
|
||||
backing_type: ?*Node = null, // optional backing type: enum u8 { ... }
|
||||
/// True when the declared NAME was a backtick raw identifier
|
||||
/// (`` `s2 :: enum { … } ``) — exempt from the reserved-type-name decl
|
||||
/// check (issue 0089). A bare reserved-name decl still errors.
|
||||
/// check. A bare reserved-name decl still errors.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -397,7 +397,7 @@ pub const UnionDecl = struct {
|
||||
field_names: []const []const u8,
|
||||
field_types: []const *Node,
|
||||
/// True when the declared NAME was a backtick raw identifier — exempt from
|
||||
/// the reserved-type-name decl check (issue 0089).
|
||||
/// the reserved-type-name decl check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -407,7 +407,7 @@ pub const ErrorSetDecl = struct {
|
||||
name: []const u8,
|
||||
tag_names: []const []const u8,
|
||||
/// True when the declared NAME was a backtick raw identifier — exempt from
|
||||
/// the reserved-type-name decl check (issue 0089).
|
||||
/// the reserved-type-name decl check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -436,7 +436,7 @@ pub const StructDecl = struct {
|
||||
constants: []const *Node = &.{}, // const_decl nodes for struct-level constants
|
||||
/// True when the declared NAME was a backtick raw identifier
|
||||
/// (`` `s2 :: struct { … } ``) — exempt from the reserved-type-name decl
|
||||
/// check (issue 0089). A bare reserved-name decl still errors.
|
||||
/// check. A bare reserved-name decl still errors.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -467,8 +467,8 @@ pub const TypeExpr = struct {
|
||||
/// True when written as a backtick raw identifier in type position
|
||||
/// (`` `s2 ``). Such a reference is the LITERAL name `s2` used as a type —
|
||||
/// resolution skips the builtin/reserved classifier and looks up a
|
||||
/// `` `s2 ``-declared type (struct/enum/union/alias), else "unknown type"
|
||||
/// (issue 0089). A bare `s2` keeps `is_raw = false` and is the int type.
|
||||
/// `` `s2 ``-declared type (struct/enum/union/alias), else "unknown
|
||||
/// type". A bare `s2` keeps `is_raw = false` and is the int type.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -518,7 +518,7 @@ pub const CatchExpr = struct {
|
||||
binding: ?[]const u8 = null,
|
||||
binding_span: ?Span = null, // span of `binding` (set iff `binding` is)
|
||||
/// True when the binding was a backtick raw identifier
|
||||
/// (`` x catch `s2 { … } ``) — exempt from the reserved-type-name check (issue 0089).
|
||||
/// (`` x catch `s2 { … } ``) — exempt from the reserved-type-name check.
|
||||
binding_is_raw: bool = false,
|
||||
body: *Node,
|
||||
is_match_body: bool = false,
|
||||
@@ -531,7 +531,7 @@ pub const OnFailStmt = struct {
|
||||
binding: ?[]const u8 = null,
|
||||
binding_span: ?Span = null, // span of `binding` (set iff `binding` is)
|
||||
/// True when the binding was a backtick raw identifier
|
||||
/// (`` onfail `s2 { … } ``) — exempt from the reserved-type-name check (issue 0089).
|
||||
/// (`` onfail `s2 { … } ``) — exempt from the reserved-type-name check.
|
||||
binding_is_raw: bool = false,
|
||||
body: *Node,
|
||||
};
|
||||
@@ -558,7 +558,7 @@ pub const ImportDecl = struct {
|
||||
name: ?[]const u8,
|
||||
/// True when the namespace NAME was a backtick raw identifier
|
||||
/// (`` `s2 :: #import "…" ``) — exempt from the reserved-type-name decl
|
||||
/// check (issue 0089). A flat `#import` (name == null) binds nothing.
|
||||
/// check. A flat `#import` (name == null) binds nothing.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -583,7 +583,7 @@ pub const ParameterizedTypeExpr = struct {
|
||||
/// (`` `s2(s64) ``). Such a reference is the LITERAL name `s2` used as a
|
||||
/// parameterized type — resolution skips the builtin parameterized
|
||||
/// classifier (e.g. the `Vector` intrinsic) and instantiates a
|
||||
/// `` `s2 ``-declared generic template (issue 0089).
|
||||
/// `` `s2 ``-declared generic template.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -638,7 +638,7 @@ pub const WhileExpr = struct {
|
||||
binding_name: ?[]const u8 = null, // for `while val := expr { ... }` optional binding
|
||||
binding_span: ?Span = null, // span of `binding_name` (set iff `binding_name` is)
|
||||
/// True when the optional binding was a backtick raw identifier
|
||||
/// (`` while `s2 := … ``) — exempt from the reserved-type-name check (issue 0089).
|
||||
/// (`` while `s2 := … ``) — exempt from the reserved-type-name check.
|
||||
binding_is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -648,12 +648,12 @@ pub const ForExpr = struct {
|
||||
capture_name: []const u8,
|
||||
capture_span: ?Span = null, // span of `capture_name` (null when omitted, e.g. `for 0..N { }`)
|
||||
/// True when `capture_name` was a backtick raw identifier
|
||||
/// (`` for xs: (`s2) ``) — exempt from the reserved-type-name check (issue 0089).
|
||||
/// (`` for xs: (`s2) ``) — exempt from the reserved-type-name check.
|
||||
capture_is_raw: bool = false,
|
||||
index_name: ?[]const u8 = null,
|
||||
index_span: ?Span = null, // span of `index_name` (set iff `index_name` is)
|
||||
/// True when `index_name` was a backtick raw identifier
|
||||
/// (`` for xs: (x, `s2) ``) — exempt from the reserved-type-name check (issue 0089).
|
||||
/// (`` for xs: (x, `s2) ``) — exempt from the reserved-type-name check.
|
||||
index_is_raw: bool = false,
|
||||
/// Range form `for start..end (i) { }`: `iterable` is the start, `range_end`
|
||||
/// the (exclusive) end. Null for the iterate-a-collection form
|
||||
@@ -678,7 +678,7 @@ pub const NamespaceDecl = struct {
|
||||
/// subset of `decls` (which also carries the module's transitive flat
|
||||
/// imports). Lowering registers these under their module-qualified name
|
||||
/// (`ns.fn`) so `pkg.fn(...)` resolves to a unique FuncId distinct from a
|
||||
/// same-named function in another module (issue 0100).
|
||||
/// same-named function in another module.
|
||||
own_decls: []const *Node = &.{},
|
||||
/// The resolved path of the module this alias targets — the importing file's
|
||||
/// own path for a `#import c` namespace (its members are synthesized there).
|
||||
@@ -687,7 +687,7 @@ pub const NamespaceDecl = struct {
|
||||
/// edge without re-walking the import graph.
|
||||
target_module_path: []const u8,
|
||||
/// True when the namespace NAME was a backtick raw identifier — exempt
|
||||
/// from the reserved-type-name decl check (issue 0089).
|
||||
/// from the reserved-type-name decl check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -700,7 +700,7 @@ pub const LibraryDecl = struct {
|
||||
lib_name: []const u8,
|
||||
name: []const u8, // sx-side constant name
|
||||
/// True when the constant NAME was a backtick raw identifier — exempt from
|
||||
/// the reserved-type-name decl check (issue 0089).
|
||||
/// the reserved-type-name decl check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -746,7 +746,7 @@ pub const UfcsAlias = struct {
|
||||
name: []const u8,
|
||||
target: []const u8,
|
||||
/// True when the alias NAME was a backtick raw identifier — exempt from
|
||||
/// the reserved-type-name decl check (issue 0089).
|
||||
/// the reserved-type-name decl check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -758,7 +758,7 @@ pub const CImportDecl = struct {
|
||||
name: ?[]const u8 = null,
|
||||
bitcode_paths: []const []const u8 = &.{}, // populated during import resolution
|
||||
/// True when the namespace NAME was a backtick raw identifier — exempt
|
||||
/// from the reserved-type-name decl check (issue 0089).
|
||||
/// from the reserved-type-name decl check.
|
||||
is_raw: bool = false,
|
||||
};
|
||||
|
||||
@@ -768,7 +768,7 @@ pub const ProtocolMethodDecl = struct {
|
||||
param_names: []const []const u8, // parameter names (excluding implicit self)
|
||||
param_name_spans: []const Span = &.{}, // one per `param_names` entry; empty for synthesized methods
|
||||
/// One per `param_names` entry: true when written as a backtick raw
|
||||
/// identifier — exempt from the reserved-type-name check (issue 0089).
|
||||
/// identifier — exempt from the reserved-type-name check.
|
||||
/// Empty for synthesized methods (treated as all-false).
|
||||
param_name_is_raw: []const bool = &.{},
|
||||
return_type: ?*Node, // null = void return
|
||||
@@ -781,7 +781,7 @@ pub const ProtocolDecl = struct {
|
||||
is_inline: bool = false, // #inline — embedded fn ptrs instead of vtable pointer
|
||||
type_params: []const StructTypeParam = &.{}, // for `protocol(Target: Type) { ... }`
|
||||
/// True when the declared NAME was a backtick raw identifier — exempt from
|
||||
/// the reserved-type-name decl check (issue 0089).
|
||||
/// the reserved-type-name decl check.
|
||||
is_raw: bool = false,
|
||||
/// Defining module path (stamped by `resolveImports`), so a parameterized
|
||||
/// protocol instantiated cross-module resolves its method signature types in
|
||||
@@ -806,7 +806,7 @@ pub const ForeignMethodDecl = struct {
|
||||
param_names: []const []const u8,
|
||||
param_name_spans: []const Span = &.{}, // one per `param_names` entry; empty for synthesized methods
|
||||
/// One per `param_names` entry: true when written as a backtick raw
|
||||
/// identifier — exempt from the reserved-type-name check (issue 0089).
|
||||
/// identifier — exempt from the reserved-type-name check.
|
||||
/// Empty for synthesized methods (treated as all-false).
|
||||
param_name_is_raw: []const bool = &.{},
|
||||
return_type: ?*Node, // null = void
|
||||
@@ -845,7 +845,7 @@ pub const ForeignClassDecl = struct {
|
||||
is_foreign: bool = false, // `#foreign #...` prefix — class is provided by the foreign runtime; we only reference it
|
||||
is_main: bool = false, // `#jni_main` / `#objc_main` — class is the launchable entry (Activity / UIApplicationDelegate / ...)
|
||||
/// True when the sx-side alias NAME was a backtick raw identifier — exempt
|
||||
/// from the reserved-type-name decl check (issue 0089).
|
||||
/// from the reserved-type-name decl check.
|
||||
is_raw: bool = false,
|
||||
/// Defining module path (stamped by `resolveImports`), so the IMP trampolines
|
||||
/// emitted for an sx-defined class resolve their method-signature types in the
|
||||
|
||||
Reference in New Issue
Block a user