From 42643b5543408b9c0b62b16b86834211db1c05e8 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Tue, 28 Apr 2026 21:09:16 +0200 Subject: grammar: More verbose error --- src/grammar.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/grammar.cc') diff --git a/src/grammar.cc b/src/grammar.cc index 6ed2766..c94a86f 100644 --- a/src/grammar.cc +++ b/src/grammar.cc @@ -224,7 +224,8 @@ class GrammarLoader { if (root_index.has_value()) { errors_.warn(first_pass_elements.find(second_pass_elements[i]->name) ->second.loc, - "Is not referenced but also not root"); + std::format("{} is not referenced but also not root", + second_pass_elements[i]->name)); } else { root_index = i; } -- cgit v1.3