From a54abb2f4e5e66877619097bfd281261f99c5103 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 4 May 2020 07:27:47 +0200 Subject: Add recognition for line-leading `%` as token --- libbuild2/parser.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libbuild2/parser.cxx') diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index e87ca95..000670b 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -335,6 +335,11 @@ namespace build2 while (tt != type::eos && !(one && parsed)) { + // Issue better diagnostics for stray `%`. + // + if (tt == type::percent) + fail (t) << "recipe without target"; + // Extract attributes if any. // assert (attributes_.empty ()); -- cgit v1.1