The mark-untested filter was removing some annotations that are valid...
I'm not sure of this 'switch' syntax ... need to think about that one day.
Signed-off-by: NeilBrown <neil@brown.name>
print
for i:=0; then i=i+1; while i < 5:
print
for i:=0; then i=i+1; while i < 5:
- switch i:
- case 0: num:="zero"
- case 1: num:="one"
- case 2: num:="two"
- case 3: num:="three"
- else num:="many"
+ switch { use i }
+ case 0: num:="zero" ;
+ case 1: num:="one" ;
+ case 2 { num:="two" } case 3 { num:="three" }
+ else num:="many"
// re-declare a CondScope variable
num := i*i
print num,", ",
// re-declare a CondScope variable
num := i*i
print num,", ",
ComplexStatements -> ComplexStatements ComplexStatement ${
if ($2 == NULL) {
ComplexStatements -> ComplexStatements ComplexStatement ${
if ($2 == NULL) {
+ $0 = $<1; // NOTEST - impossible
} else {
$0 = new(binode);
$0->op = Block;
} else {
$0 = new(binode);
$0->op = Block;
}$
| ComplexStatement ${
if ($1 == NULL) {
}$
| ComplexStatement ${
if ($1 == NULL) {
+ $0 = NULL; // NOTEST - impossible
} else {
$0 = new(binode);
$0->op = Block;
} else {
$0 = new(binode);
$0->op = Block;
$0 = declare_function(c, $<FN, $<Ar, $<Ty, NULL, $<Bl);
}$
| func FuncName ( OpenScope ArgsLine ) : ( ArgsLine ) Block Newlines ${
$0 = declare_function(c, $<FN, $<Ar, $<Ty, NULL, $<Bl);
}$
| func FuncName ( OpenScope ArgsLine ) : ( ArgsLine ) Block Newlines ${
- $0 = declare_function(c, $<FN, $<AL, NULL, $<AL2, $<Bl);
+ $0 = declare_function(c, $<FN, $<AL, NULL, $<AL2, $<Bl); // UNTESTED
}$
| func FuncName IN OpenScope Args OUT OptNL return Type Newlines do Block Newlines ${
$0 = declare_function(c, $<FN, $<Ar, $<Ty, NULL, $<Bl);
}$
| func FuncName IN OpenScope Args OUT OptNL return Type Newlines do Block Newlines ${
$0 = declare_function(c, $<FN, $<Ar, $<Ty, NULL, $<Bl);
$0 = declare_function(c, $<FN, $<Ar, NULL, $<Ar2, $<Bl);
}$
| func FuncName NEWLINE OpenScope return IN Args OUT OptNL do Block Newlines ${
$0 = declare_function(c, $<FN, $<Ar, NULL, $<Ar2, $<Bl);
}$
| func FuncName NEWLINE OpenScope return IN Args OUT OptNL do Block Newlines ${
- $0 = declare_function(c, $<FN, NULL, NULL, $<Ar, $<Bl);
+ $0 = declare_function(c, $<FN, NULL, NULL, $<Ar, $<Bl); // UNTESTED
}$
###### print func decls
}$
###### print func decls
if [ ! -f "$b" ]; then
continue
fi
if [ ! -f "$b" ]; then
continue
fi
- grep '#####:' "$i" | grep -vE '(NOTEST|UNTESTED|: *##|}\$$|:$|:[ ]*(\||\$))' |
+ grep '#####:' "$i" | grep -vE '(NOTEST|UNTESTED|: *##|}\$$|:$)' |
awk -F: '{printf "%ds,$, // UNTESTED,\n", $2}' |
sed -i -e 's,[ ]*// UNTESTED$,,' -f - "$b"
grep '[0-8]: *[1-9][0-9]*:.*// NOTEST$' "$i" |
awk -F: '{printf "%ds,$, // UNTESTED,\n", $2}' |
sed -i -e 's,[ ]*// UNTESTED$,,' -f - "$b"
grep '[0-8]: *[1-9][0-9]*:.*// NOTEST$' "$i" |