You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 23, 2025. It is now read-only.
Mixed doc-comment and line-comment is not supported by grammar.y.
// A doc-comment followed by a line-comment is not supported by grammar.y.constS=struct {
//! doc/// doc// doca: i32,
};
NOTE: I found mixing doc-comment and line-comment confusing, and autodoc doesn't not handle them correctly.
Examples:
std/mem.zig:3760
/// Force an evaluation of the expression; this tries to prevent/// the compiler from optimizing the computation away even if the/// result eventually gets discarded.// TODO: use @declareSideEffect() when it is available - https://github.com/ziglang/zig/issues/6168pubfndoNotOptimizeAway(val: anytype) void {
/// This relocation is meaningful only when the machine type is ARM or Thumb./// The base relocation applies the 32-bit address of a symbol across a consecutive MOVW/MOVT instruction pair.// ARM_MOV32 = 5,/// This relocation is only meaningful when the machine type is RISC-V./// The base relocation applies to the high 20 bits of a 32-bit absolute address.// RISCV_HIGH20 = 5,/// Reserved, must be zero.RESERVED=6,
Currently,
grammar.yis out of sync with the actual grammar implemented by thezigcompiler (instd/zig/tokenizerandstd/zig/parser.zig).These are the places where
grammar.yandzigdiverges, found with the improved parser from #42, using files insrcandlib/stdin thezigrepository.doc-comments not allowed in top-level
comptimeandtestdeclaration.Saturating arithmetic is not supported by
grammar.y.Mixed
doc-commentandline-commentis not supported bygrammar.y.NOTE: I found mixing
doc-commentandline-commentconfusing, andautodocdoesn't not handle them correctly.Examples:
std/mem.zig:3760
See: https://ziglang.org/documentation/master/std/#root;mem.doNotOptimizeAway.
std/coff.zig:354
See https://ziglang.org/documentation/master/std/#root;coff.BaseRelocationType.
New
addrspacekeyword.Commit: ziglang/zig@ccc7f9987 (Address spaces: addrspace(A) parsing)
Date: 2021-09-14
Inline switch prong not supported by
grammar.y.Commit: ziglang/zig@b4d81857f (stage1+2: parse inline switch cases)
Date: 2022-02-13
New packed
structsyntax.Commit: ziglang/zig@6249a24e8 (stage2: integer-backed packed structs)
Date: 2022-02-23