git.annexia.org
/
goals.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parser: Allow an empty goal statement with no targets, deps or code.
[goals.git]
/
src
/
parser.mly
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))
}
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))
| option(PURE) FUNCTION ID params_decl return_decl EQUALS CODE
{
$3, Ast.EFuncDefn ($loc, ($4, $5, $1 <> None, $7))