From 04bf0b7cbe98c70d7e434e24a3eb4b03889c0c56 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 29 Sep 2022 15:17:33 +0200 Subject: Tighten low-verbosity diagnostics name deduction logic Specifically, don't try to derive low-verbosity name from what looks like an eval context of a function call. --- libbuild2/lexer.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libbuild2/lexer.hxx') diff --git a/libbuild2/lexer.hxx b/libbuild2/lexer.hxx index 148666e..78d35d7 100644 --- a/libbuild2/lexer.hxx +++ b/libbuild2/lexer.hxx @@ -175,7 +175,7 @@ namespace build2 virtual token next (); - // Peek at the first two characters of the next token(s). Return the + // Peek at the first one/two characters of the next token(s). Return the // characters or '\0' if either would be eos. Also return an indicator of // whether the next token would be separated. Note: cannot be used to peek // at the first character of a line. @@ -184,6 +184,9 @@ namespace build2 // mode in which these characters will actually be parsed use the same // whitespace separation (the sep_space and sep_newline values). // + pair + peek_char (); + pair, bool> peek_chars (); -- cgit v1.1