Skip to content

Commit

Permalink
Add corpus baseline for simple statements
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Feb 10, 2023
1 parent aea2ff1 commit 17ae9c2
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions corpus/test
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,66 @@ redef event foo(x: count)
(stmt_list
(expr
(id)))))

================================================================================
Simple statements
================================================================================

function foo(xs: vector of int): int
{
for ( _ in xs )
{ }

for ( [_] in xs )
{ }

while ( T )
{ }

switch ( 1 )
{
case 1:
fallthrough;
default:
break;
}

return 0;
}

--------------------------------------------------------------------------------

(source_file
(func_decl
(id)
(func_params
(formal_args
(formal_arg
(id)
(type
(type))))
(type))
(stmt_list
(id)
(expr
(id))
(id)
(expr
(id))
(expr
(constant
(boolean)))
(expr
(expr
(constant
(integer))))
(case_list
(expr_list
(expr
(constant
(integer))))
(stmt_list)
(stmt_list))
(expr
(constant
(integer))))))

0 comments on commit 17ae9c2

Please sign in to comment.