git.annexia.org
/
goals.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc05c5c
)
parser: Allow an empty goal statement with no targets, deps or code.
author
Richard W.M. Jones
<rjones@redhat.com>
Fri, 10 Jan 2020 12:30:51 +0000
(12:30 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 10 Jan 2020 12:31:31 +0000
(12:31 +0000)
This allows you to write "do nothing" goals like:
goal all ;
src/parser.mly
patch
|
blob
|
history
diff --git
a/src/parser.mly
b/src/parser.mly
index
eedbddb
..
9d6988b
100644
(file)
--- 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))