From 017d19bf31e5e4d15423fe7c8068b50034b919a3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 10 Jan 2020 12:30:51 +0000 Subject: [PATCH] parser: Allow an empty goal statement with no targets, deps or code. This allows you to write "do nothing" goals like: goal all ; --- src/parser.mly | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parser.mly b/src/parser.mly index eedbddb..9d6988b 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -118,6 +118,10 @@ stmt: let name, params = $1 in name, Ast.EGoalDefn ($loc, (params, [], [], Some $2)) } + | GOAL ID + { + $2, Ast.EGoalDefn ($loc, ([], [], [], None)) + } | option(PURE) FUNCTION ID params_decl return_decl EQUALS CODE { $3, Ast.EFuncDefn ($loc, ($4, $5, $1 <> None, $7)) -- 1.8.3.1