commit 63e46f804ff19a077cd7232bcb2c46bb8ee81db7
parent ed56a543a685cb22fb9ef037e606aeab9cb5f8be
Author: gracefu <81774659+gracefuu@users.noreply.github.com>
Date: Wed, 21 May 2025 12:53:22 +0800
Track parsed (sub)string in tracy
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/AstGen3.zig b/src/AstGen3.zig
@@ -215,6 +215,7 @@ fn parseInlineColumn(
tracy_frame.setName(@tagName(.text));
if (self.scanner.peek()) |peek| {
const alignment, const line = peek;
+ tracy_frame.addText(line.toUnpaddedSlice());
try self.insertTextLine(.text, .text, parent_idx, line);
if (alignment == .misaligned)
try self.appendPointError(.inconsistent_indentation, parent_idx, line.ptr);
@@ -243,6 +244,7 @@ fn parseInlineColumn(
tracy_frame.setName(@tagName(.text));
if (self.scanner.peek()) |peek| {
const alignment, const line = peek;
+ tracy_frame.addText(line.toUnpaddedSlice());
try self.insertTextLine(.space_text, .text, parent_idx, line);
try self.appendNodeError(.unexpected_block_in_inline_context, self.lastNodeIdx());
if (alignment == .misaligned)
@@ -287,6 +289,7 @@ inline fn parseColumnImpl(
const tracy_frame = tracy.trace(@src());
defer tracy_frame.end();
+ tracy_frame.addText(line.toUnpaddedSlice());
// Parse one block and get its id so we can attach an error to it if the block was misaligned.
const block_idx: Node.Idx = block_idx: {
// Reset list if any other block type appears