From c65c1c6b043fd513b994e09d8127a03386bebf71 Mon Sep 17 00:00:00 2001 From: Yi Sun Date: Sat, 1 Aug 2026 18:34:35 +0800 Subject: [PATCH] docs(ast): discipline comments per comment spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - removed 2 narrations of the obvious (§5.1): impl-block header on FnCall and the end-of-line 'combine prefix with :: separator' comment - rewrote 1 imprecise doc (§4/§8.1): Pos is a byte offset (pest span start), not 'byte offset or character index' - reviewed 6 files; remaining dense rustdoc field/variant docs kept as borderline keeps under house style (no dividers, tags, or commented-out code found in scope) --- src/ast/expr.rs | 2 -- src/ast/types.rs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ast/expr.rs b/src/ast/expr.rs index b4e91fd..e5d5004 100644 --- a/src/ast/expr.rs +++ b/src/ast/expr.rs @@ -174,14 +174,12 @@ pub struct FnCall { pub vals: RightValList, } -/// Implementation of helper methods for function calls. impl FnCall { /// Returns the fully-qualified function name, including the module prefix /// if one is present (e.g., `"io::print"`), or just the bare function /// name otherwise (e.g., `"print"`). pub fn qualified_name(&self) -> String { if let Some(module) = &self.module_prefix { - // Combine module prefix and function name with `::` separator. format!("{module}::{}", self.name) } else { self.name.clone() diff --git a/src/ast/types.rs b/src/ast/types.rs index a6bad02..6429771 100644 --- a/src/ast/types.rs +++ b/src/ast/types.rs @@ -4,7 +4,7 @@ //! nodes that appear in variable declarations, function parameters, and //! return-type annotations. -/// Byte offset (or character index) into the source text. +/// Byte offset into the source text. /// Used to track where each AST node originated for error reporting. pub type Pos = usize;