Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/Parser/ParseNode.h	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -414,4 +414,8 @@
 Statement * build_compound( StatementNode * first );
 Statement * build_asmstmt( bool voltile, ConstantExpr * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr );
+WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when );
+WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when, WaitForStmt * existing );
+WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when );
+WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when, StatementNode * else_stmt, ExpressionNode * else_when );
 
 //##############################################################################
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/Parser/StatementNode.cc	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -93,5 +93,5 @@
 		elseb = branches.front();
 	} // if
-	
+
 	std::list< Statement * > init;
 	if ( ctl->init != 0 ) {
@@ -207,4 +207,72 @@
 }
 
+WaitForStmt * build_waitfor( ExpressionNode * targetExpr, StatementNode * stmt, ExpressionNode * when ) {
+	auto node = new WaitForStmt();
+
+	WaitForStmt::Target target;
+	target.function = maybeBuild<Expression>( targetExpr );
+	buildMoveList< Expression >( targetExpr, target.arguments );
+	delete targetExpr;
+
+	node->clauses.push_back( WaitForStmt::Clause{
+		target,
+		maybeMoveBuild<Statement >( stmt ),
+		maybeMoveBuild<Expression>( when )
+	});
+
+	return node;
+}
+
+WaitForStmt * build_waitfor( ExpressionNode * targetExpr, StatementNode * stmt, ExpressionNode * when, WaitForStmt * node ) {
+	WaitForStmt::Target target;
+
+	target.function = maybeBuild<Expression>( targetExpr );
+	buildMoveList< Expression >( targetExpr, target.arguments );
+	delete targetExpr;
+
+	node->clauses.push_back( WaitForStmt::Clause{
+		std::move( target ),
+		maybeMoveBuild<Statement >( stmt ),
+		maybeMoveBuild<Expression>( when )
+	});
+
+	return node;
+}
+
+WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when ) {
+	auto node = new WaitForStmt();
+
+	if( timeout ) {
+		node->timeout.time      = maybeMoveBuild<Expression>( timeout );
+		node->timeout.statement = maybeMoveBuild<Statement >( stmt    );
+		node->timeout.condition = maybeMoveBuild<Expression>( when    );
+	}
+	else {
+		node->orelse.statement  = maybeMoveBuild<Statement >( stmt    );
+		node->orelse.condition  = maybeMoveBuild<Expression>( when    );
+	}
+
+	return node;
+}
+
+WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when,  StatementNode * else_stmt, ExpressionNode * else_when ) {
+	auto node = new WaitForStmt();
+
+	node->timeout.time      = maybeMoveBuild<Expression>( timeout );
+	node->timeout.statement = maybeMoveBuild<Statement >( stmt    );
+	node->timeout.condition = maybeMoveBuild<Expression>( when    );
+
+	node->orelse.statement = maybeMoveBuild<Statement >( else_stmt );
+	node->orelse.condition = maybeMoveBuild<Expression>( else_when );
+
+	return node;
+}
+
+// WaitForStmt::Target build_waitfor( const std::string * name, ExpressionNode * arguments ) {
+// 	 return WaitForStmt::Clause{
+
+// 	 };
+// }
+
 Statement *build_compound( StatementNode *first ) {
 	CompoundStmt *cs = new CompoundStmt( noLabels );
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/Parser/parser.yy	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -97,4 +97,5 @@
 	DeclarationNode::TypeClass tclass;
 	StatementNode * sn;
+	WaitForStmt * wfs;
 	ConstantExpr * constant;
 	IfCtl * ifctl;
@@ -187,4 +188,5 @@
 %type<flag> asm_volatile_opt
 %type<en> handler_predicate_opt
+%type<en> when_clause_opt timeout
 
 // statements
@@ -192,5 +194,5 @@
 %type<sn> iteration_statement			jump_statement
 %type<sn> with_statement				exception_statement			asm_statement
-%type<sn> when_clause_opt				waitfor_statement			waitfor_clause				waitfor				timeout
+%type<sn> waitfor_statement
 %type<sn> fall_through_opt				fall_through
 %type<sn> statement						statement_list
@@ -202,4 +204,6 @@
 %type<sn> handler_clause				finally_clause
 %type<catch_kind> handler_key
+%type<wfs> waitfor_clause
+%type<en> waitfor
 
 // declarations
@@ -979,39 +983,46 @@
 when_clause_opt:
 	// empty
-		{ $$ = nullptr; }								// FIX ME
+		{ $$ = nullptr; }
 	| WHEN '(' comma_expression ')'
-		{ $$ = nullptr; }								// FIX ME
+		{ $$ = $3; }
 	;
 
 waitfor:
 	WAITFOR '(' identifier ')'
- 		{ $$ = nullptr; }								// FIX ME
+ 		{
+			$$ = new ExpressionNode( new NameExpr( *$3 ) );
+			delete $3;
+		}
 	| WAITFOR '(' identifier ',' argument_expression_list ')'
- 		{ $$ = nullptr; }								// FIX ME
+ 		{
+			$$ = new ExpressionNode( new NameExpr( *$3 ) );
+		  	$$->set_last( $5 );
+			delete $3;
+		}
 	;
 
 timeout:
 	TIMEOUT '(' comma_expression ')'
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = $3; }
 	;
 
 waitfor_clause:
 	when_clause_opt waitfor statement %prec THEN
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor( $2, $3, $1 ); }
 	| when_clause_opt waitfor statement WOR waitfor_clause
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor( $2, $3, $1, $5 ); }
 	| when_clause_opt timeout statement %prec THEN
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor_timeout( $2, $3, $1 ); }
 	| when_clause_opt ELSE statement
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor_timeout( nullptr, $3, $1 ); }
 	| when_clause_opt timeout statement WOR when_clause_opt ELSE statement
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor_timeout( $2, $3, $1, $7, $5 ); }
 	;
 
 waitfor_statement:
 	when_clause_opt waitfor statement %prec THEN
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = new StatementNode( build_waitfor( $2, $3, $1 ) ); }
 	| when_clause_opt waitfor statement WOR waitfor_clause
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = new StatementNode( build_waitfor( $2, $3, $1, $5 ) ); }
 	;
 
Index: src/SynTree/Mutator.cc
===================================================================
--- src/SynTree/Mutator.cc	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/SynTree/Mutator.cc	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -32,5 +32,5 @@
 Mutator::~Mutator() {}
 
-DeclarationWithType *Mutator::mutate( ObjectDecl *objectDecl ) {
+DeclarationWithType * Mutator::mutate( ObjectDecl *objectDecl ) {
 	objectDecl->set_type( maybeMutate( objectDecl->get_type(), *this ) );
 	objectDecl->set_init( maybeMutate( objectDecl->get_init(), *this ) );
@@ -39,5 +39,5 @@
 }
 
-DeclarationWithType *Mutator::mutate( FunctionDecl *functionDecl ) {
+DeclarationWithType * Mutator::mutate( FunctionDecl *functionDecl ) {
 	functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
 	functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
@@ -45,5 +45,5 @@
 }
 
-Declaration *Mutator::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
+Declaration * Mutator::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
 	mutateAll( aggregateDecl->get_parameters(), *this );
 	mutateAll( aggregateDecl->get_members(), *this );
@@ -51,25 +51,25 @@
 }
 
-Declaration *Mutator::mutate( StructDecl *aggregateDecl ) {
+Declaration * Mutator::mutate( StructDecl *aggregateDecl ) {
 	handleAggregateDecl( aggregateDecl );
 	return aggregateDecl;
 }
 
-Declaration *Mutator::mutate( UnionDecl *aggregateDecl ) {
+Declaration * Mutator::mutate( UnionDecl *aggregateDecl ) {
 	handleAggregateDecl( aggregateDecl );
 	return aggregateDecl;
 }
 
-Declaration *Mutator::mutate( EnumDecl *aggregateDecl ) {
+Declaration * Mutator::mutate( EnumDecl *aggregateDecl ) {
 	handleAggregateDecl( aggregateDecl );
 	return aggregateDecl;
 }
 
-Declaration *Mutator::mutate( TraitDecl *aggregateDecl ) {
+Declaration * Mutator::mutate( TraitDecl *aggregateDecl ) {
 	handleAggregateDecl( aggregateDecl );
 	return aggregateDecl;
 }
 
-Declaration *Mutator::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
+Declaration * Mutator::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
 	mutateAll( typeDecl->get_parameters(), *this );
 	mutateAll( typeDecl->get_assertions(), *this );
@@ -78,5 +78,5 @@
 }
 
-TypeDecl *Mutator::mutate( TypeDecl *typeDecl ) {
+TypeDecl * Mutator::mutate( TypeDecl *typeDecl ) {
 	handleNamedTypeDecl( typeDecl );
 	typeDecl->set_init( maybeMutate( typeDecl->get_init(), *this ) );
@@ -84,10 +84,10 @@
 }
 
-Declaration *Mutator::mutate( TypedefDecl *typeDecl ) {
+Declaration * Mutator::mutate( TypedefDecl *typeDecl ) {
 	handleNamedTypeDecl( typeDecl );
 	return typeDecl;
 }
 
-AsmDecl *Mutator::mutate( AsmDecl *asmDecl ) {
+AsmDecl * Mutator::mutate( AsmDecl *asmDecl ) {
 	asmDecl->set_stmt( maybeMutate( asmDecl->get_stmt(), *this ) );
 	return asmDecl;
@@ -95,15 +95,15 @@
 
 
-CompoundStmt *Mutator::mutate( CompoundStmt *compoundStmt ) {
+CompoundStmt * Mutator::mutate( CompoundStmt *compoundStmt ) {
 	mutateAll( compoundStmt->get_kids(), *this );
 	return compoundStmt;
 }
 
-Statement *Mutator::mutate( ExprStmt *exprStmt ) {
+Statement * Mutator::mutate( ExprStmt *exprStmt ) {
 	exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
 	return exprStmt;
 }
 
-Statement *Mutator::mutate( AsmStmt *asmStmt ) {
+Statement * Mutator::mutate( AsmStmt *asmStmt ) {
 	asmStmt->set_instruction( maybeMutate( asmStmt->get_instruction(), *this ) );
 	mutateAll( asmStmt->get_output(), *this );
@@ -113,5 +113,5 @@
 }
 
-Statement *Mutator::mutate( IfStmt *ifStmt ) {
+Statement * Mutator::mutate( IfStmt *ifStmt ) {
 	mutateAll( ifStmt->get_initialization(), *this );
 	ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
@@ -121,5 +121,5 @@
 }
 
-Statement *Mutator::mutate( WhileStmt *whileStmt ) {
+Statement * Mutator::mutate( WhileStmt *whileStmt ) {
 	whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
 	whileStmt->set_body( maybeMutate( whileStmt->get_body(), *this ) );
@@ -127,5 +127,5 @@
 }
 
-Statement *Mutator::mutate( ForStmt *forStmt ) {
+Statement * Mutator::mutate( ForStmt *forStmt ) {
 	mutateAll( forStmt->get_initialization(), *this );
 	forStmt->set_condition( maybeMutate( forStmt->get_condition(), *this ) );
@@ -135,5 +135,5 @@
 }
 
-Statement *Mutator::mutate( SwitchStmt *switchStmt ) {
+Statement * Mutator::mutate( SwitchStmt *switchStmt ) {
 	switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
 	mutateAll( switchStmt->get_statements(), *this );
@@ -141,5 +141,5 @@
 }
 
-Statement *Mutator::mutate( CaseStmt *caseStmt ) {
+Statement * Mutator::mutate( CaseStmt *caseStmt ) {
 	caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
 	mutateAll (caseStmt->get_statements(), *this );
@@ -148,14 +148,14 @@
 }
 
-Statement *Mutator::mutate( BranchStmt *branchStmt ) {
+Statement * Mutator::mutate( BranchStmt *branchStmt ) {
 	return branchStmt;
 }
 
-Statement *Mutator::mutate( ReturnStmt *returnStmt ) {
+Statement * Mutator::mutate( ReturnStmt *returnStmt ) {
 	returnStmt->set_expr( maybeMutate( returnStmt->get_expr(), *this ) );
 	return returnStmt;
 }
 
-Statement *Mutator::mutate( ThrowStmt *throwStmt ) {
+Statement * Mutator::mutate( ThrowStmt *throwStmt ) {
 	throwStmt->set_expr( maybeMutate( throwStmt->get_expr(), *this ) );
 	throwStmt->set_target( maybeMutate( throwStmt->get_target(), *this ) );
@@ -163,5 +163,5 @@
 }
 
-Statement *Mutator::mutate( TryStmt *tryStmt ) {
+Statement * Mutator::mutate( TryStmt *tryStmt ) {
 	tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
 	mutateAll( tryStmt->get_catchers(), *this );
@@ -170,5 +170,5 @@
 }
 
-Statement *Mutator::mutate( CatchStmt *catchStmt ) {
+Statement * Mutator::mutate( CatchStmt *catchStmt ) {
 	catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
 	catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
@@ -177,19 +177,37 @@
 }
 
-Statement *Mutator::mutate( FinallyStmt *finalStmt ) {
+Statement * Mutator::mutate( FinallyStmt *finalStmt ) {
 	finalStmt->set_block( maybeMutate( finalStmt->get_block(), *this ) );
 	return finalStmt;
 }
 
-NullStmt *Mutator::mutate( NullStmt *nullStmt ) {
+Statement * Mutator::mutate( WaitForStmt *waitforStmt ) {
+	for( auto & clause : waitforStmt->clauses ) {
+		clause.target.function = maybeMutate( clause.target.function, *this );
+		mutateAll( clause.target.arguments, *this );
+
+		clause.statement = maybeMutate( clause.statement, *this );
+		clause.condition = maybeMutate( clause.condition, *this );
+	}
+
+	waitforStmt->timeout.time      = maybeMutate( waitforStmt->timeout.time, *this );
+	waitforStmt->timeout.statement = maybeMutate( waitforStmt->timeout.statement, *this );
+	waitforStmt->timeout.condition = maybeMutate( waitforStmt->timeout.condition, *this );
+	waitforStmt->orelse.statement  = maybeMutate( waitforStmt->orelse.statement, *this );
+	waitforStmt->orelse.condition  = maybeMutate( waitforStmt->orelse.condition, *this );
+
+	return waitforStmt;
+}
+
+NullStmt * Mutator::mutate( NullStmt *nullStmt ) {
 	return nullStmt;
 }
 
-Statement *Mutator::mutate( DeclStmt *declStmt ) {
+Statement * Mutator::mutate( DeclStmt *declStmt ) {
 	declStmt->set_decl( maybeMutate( declStmt->get_decl(), *this ) );
 	return declStmt;
 }
 
-Statement *Mutator::mutate( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
+Statement * Mutator::mutate( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
 	impCtorDtorStmt->set_callStmt( maybeMutate( impCtorDtorStmt->get_callStmt(), *this ) );
 	return impCtorDtorStmt;
@@ -197,5 +215,5 @@
 
 
-Expression *Mutator::mutate( ApplicationExpr *applicationExpr ) {
+Expression * Mutator::mutate( ApplicationExpr *applicationExpr ) {
 	applicationExpr->set_env( maybeMutate( applicationExpr->get_env(), *this ) );
 	applicationExpr->set_result( maybeMutate( applicationExpr->get_result(), *this ) );
@@ -205,5 +223,5 @@
 }
 
-Expression *Mutator::mutate( UntypedExpr *untypedExpr ) {
+Expression * Mutator::mutate( UntypedExpr *untypedExpr ) {
 	untypedExpr->set_env( maybeMutate( untypedExpr->get_env(), *this ) );
 	untypedExpr->set_result( maybeMutate( untypedExpr->get_result(), *this ) );
@@ -212,5 +230,5 @@
 }
 
-Expression *Mutator::mutate( NameExpr *nameExpr ) {
+Expression * Mutator::mutate( NameExpr *nameExpr ) {
 	nameExpr->set_env( maybeMutate( nameExpr->get_env(), *this ) );
 	nameExpr->set_result( maybeMutate( nameExpr->get_result(), *this ) );
@@ -218,5 +236,5 @@
 }
 
-Expression *Mutator::mutate( AddressExpr *addressExpr ) {
+Expression * Mutator::mutate( AddressExpr *addressExpr ) {
 	addressExpr->set_env( maybeMutate( addressExpr->get_env(), *this ) );
 	addressExpr->set_result( maybeMutate( addressExpr->get_result(), *this ) );
@@ -225,5 +243,5 @@
 }
 
-Expression *Mutator::mutate( LabelAddressExpr *labelAddressExpr ) {
+Expression * Mutator::mutate( LabelAddressExpr *labelAddressExpr ) {
 	labelAddressExpr->set_env( maybeMutate( labelAddressExpr->get_env(), *this ) );
 	labelAddressExpr->set_result( maybeMutate( labelAddressExpr->get_result(), *this ) );
@@ -232,5 +250,5 @@
 }
 
-Expression *Mutator::mutate( CastExpr *castExpr ) {
+Expression * Mutator::mutate( CastExpr *castExpr ) {
 	castExpr->set_env( maybeMutate( castExpr->get_env(), *this ) );
 	castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) );
@@ -239,5 +257,5 @@
 }
 
-Expression *Mutator::mutate( VirtualCastExpr *castExpr ) {
+Expression * Mutator::mutate( VirtualCastExpr *castExpr ) {
 	castExpr->set_env( maybeMutate( castExpr->get_env(), *this ) );
 	castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) );
@@ -246,5 +264,5 @@
 }
 
-Expression *Mutator::mutate( UntypedMemberExpr *memberExpr ) {
+Expression * Mutator::mutate( UntypedMemberExpr *memberExpr ) {
 	memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) );
 	memberExpr->set_result( maybeMutate( memberExpr->get_result(), *this ) );
@@ -254,5 +272,5 @@
 }
 
-Expression *Mutator::mutate( MemberExpr *memberExpr ) {
+Expression * Mutator::mutate( MemberExpr *memberExpr ) {
 	memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) );
 	memberExpr->set_result( maybeMutate( memberExpr->get_result(), *this ) );
@@ -261,5 +279,5 @@
 }
 
-Expression *Mutator::mutate( VariableExpr *variableExpr ) {
+Expression * Mutator::mutate( VariableExpr *variableExpr ) {
 	variableExpr->set_env( maybeMutate( variableExpr->get_env(), *this ) );
 	variableExpr->set_result( maybeMutate( variableExpr->get_result(), *this ) );
@@ -267,5 +285,5 @@
 }
 
-Expression *Mutator::mutate( ConstantExpr *constantExpr ) {
+Expression * Mutator::mutate( ConstantExpr *constantExpr ) {
 	constantExpr->set_env( maybeMutate( constantExpr->get_env(), *this ) );
 	constantExpr->set_result( maybeMutate( constantExpr->get_result(), *this ) );
@@ -274,5 +292,5 @@
 }
 
-Expression *Mutator::mutate( SizeofExpr *sizeofExpr ) {
+Expression * Mutator::mutate( SizeofExpr *sizeofExpr ) {
 	sizeofExpr->set_env( maybeMutate( sizeofExpr->get_env(), *this ) );
 	sizeofExpr->set_result( maybeMutate( sizeofExpr->get_result(), *this ) );
@@ -285,5 +303,5 @@
 }
 
-Expression *Mutator::mutate( AlignofExpr *alignofExpr ) {
+Expression * Mutator::mutate( AlignofExpr *alignofExpr ) {
 	alignofExpr->set_env( maybeMutate( alignofExpr->get_env(), *this ) );
 	alignofExpr->set_result( maybeMutate( alignofExpr->get_result(), *this ) );
@@ -296,5 +314,5 @@
 }
 
-Expression *Mutator::mutate( UntypedOffsetofExpr *offsetofExpr ) {
+Expression * Mutator::mutate( UntypedOffsetofExpr *offsetofExpr ) {
 	offsetofExpr->set_env( maybeMutate( offsetofExpr->get_env(), *this ) );
 	offsetofExpr->set_result( maybeMutate( offsetofExpr->get_result(), *this ) );
@@ -303,5 +321,5 @@
 }
 
-Expression *Mutator::mutate( OffsetofExpr *offsetofExpr ) {
+Expression * Mutator::mutate( OffsetofExpr *offsetofExpr ) {
 	offsetofExpr->set_env( maybeMutate( offsetofExpr->get_env(), *this ) );
 	offsetofExpr->set_result( maybeMutate( offsetofExpr->get_result(), *this ) );
@@ -311,5 +329,5 @@
 }
 
-Expression *Mutator::mutate( OffsetPackExpr *offsetPackExpr ) {
+Expression * Mutator::mutate( OffsetPackExpr *offsetPackExpr ) {
 	offsetPackExpr->set_env( maybeMutate( offsetPackExpr->get_env(), *this ) );
 	offsetPackExpr->set_result( maybeMutate( offsetPackExpr->get_result(), *this ) );
@@ -318,5 +336,5 @@
 }
 
-Expression *Mutator::mutate( AttrExpr *attrExpr ) {
+Expression * Mutator::mutate( AttrExpr *attrExpr ) {
 	attrExpr->set_env( maybeMutate( attrExpr->get_env(), *this ) );
 	attrExpr->set_result( maybeMutate( attrExpr->get_result(), *this ) );
@@ -329,5 +347,5 @@
 }
 
-Expression *Mutator::mutate( LogicalExpr *logicalExpr ) {
+Expression * Mutator::mutate( LogicalExpr *logicalExpr ) {
 	logicalExpr->set_env( maybeMutate( logicalExpr->get_env(), *this ) );
 	logicalExpr->set_result( maybeMutate( logicalExpr->get_result(), *this ) );
@@ -337,5 +355,5 @@
 }
 
-Expression *Mutator::mutate( ConditionalExpr *conditionalExpr ) {
+Expression * Mutator::mutate( ConditionalExpr *conditionalExpr ) {
 	conditionalExpr->set_env( maybeMutate( conditionalExpr->get_env(), *this ) );
 	conditionalExpr->set_result( maybeMutate( conditionalExpr->get_result(), *this ) );
@@ -346,5 +364,5 @@
 }
 
-Expression *Mutator::mutate( CommaExpr *commaExpr ) {
+Expression * Mutator::mutate( CommaExpr *commaExpr ) {
 	commaExpr->set_env( maybeMutate( commaExpr->get_env(), *this ) );
 	commaExpr->set_result( maybeMutate( commaExpr->get_result(), *this ) );
@@ -354,5 +372,5 @@
 }
 
-Expression *Mutator::mutate( TypeExpr *typeExpr ) {
+Expression * Mutator::mutate( TypeExpr *typeExpr ) {
 	typeExpr->set_env( maybeMutate( typeExpr->get_env(), *this ) );
 	typeExpr->set_result( maybeMutate( typeExpr->get_result(), *this ) );
@@ -361,5 +379,5 @@
 }
 
-Expression *Mutator::mutate( AsmExpr *asmExpr ) {
+Expression * Mutator::mutate( AsmExpr *asmExpr ) {
 	asmExpr->set_env( maybeMutate( asmExpr->get_env(), *this ) );
 	asmExpr->set_inout( maybeMutate( asmExpr->get_inout(), *this ) );
@@ -386,5 +404,5 @@
 }
 
-Expression *Mutator::mutate( CompoundLiteralExpr *compLitExpr ) {
+Expression * Mutator::mutate( CompoundLiteralExpr *compLitExpr ) {
 	compLitExpr->set_env( maybeMutate( compLitExpr->get_env(), *this ) );
 	compLitExpr->set_result( maybeMutate( compLitExpr->get_result(), *this ) );
@@ -393,5 +411,5 @@
 }
 
-Expression *Mutator::mutate( RangeExpr *rangeExpr ) {
+Expression * Mutator::mutate( RangeExpr *rangeExpr ) {
 	rangeExpr->set_env( maybeMutate( rangeExpr->get_env(), *this ) );
 	rangeExpr->set_low( maybeMutate( rangeExpr->get_low(), *this ) );
@@ -400,5 +418,5 @@
 }
 
-Expression *Mutator::mutate( UntypedTupleExpr *tupleExpr ) {
+Expression * Mutator::mutate( UntypedTupleExpr *tupleExpr ) {
 	tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
 	tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
@@ -407,5 +425,5 @@
 }
 
-Expression *Mutator::mutate( TupleExpr *tupleExpr ) {
+Expression * Mutator::mutate( TupleExpr *tupleExpr ) {
 	tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
 	tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
@@ -414,5 +432,5 @@
 }
 
-Expression *Mutator::mutate( TupleIndexExpr *tupleExpr ) {
+Expression * Mutator::mutate( TupleIndexExpr *tupleExpr ) {
 	tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
 	tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
@@ -421,5 +439,5 @@
 }
 
-Expression *Mutator::mutate( TupleAssignExpr *assignExpr ) {
+Expression * Mutator::mutate( TupleAssignExpr *assignExpr ) {
 	assignExpr->set_env( maybeMutate( assignExpr->get_env(), *this ) );
 	assignExpr->set_result( maybeMutate( assignExpr->get_result(), *this ) );
@@ -428,5 +446,5 @@
 }
 
-Expression *Mutator::mutate( StmtExpr *stmtExpr ) {
+Expression * Mutator::mutate( StmtExpr *stmtExpr ) {
 	stmtExpr->set_env( maybeMutate( stmtExpr->get_env(), *this ) );
 	stmtExpr->set_result( maybeMutate( stmtExpr->get_result(), *this ) );
@@ -437,5 +455,5 @@
 }
 
-Expression *Mutator::mutate( UniqueExpr *uniqueExpr ) {
+Expression * Mutator::mutate( UniqueExpr *uniqueExpr ) {
 	uniqueExpr->set_env( maybeMutate( uniqueExpr->get_env(), *this ) );
 	uniqueExpr->set_result( maybeMutate( uniqueExpr->get_result(), *this ) );
@@ -444,5 +462,5 @@
 }
 
-Expression *Mutator::mutate( UntypedInitExpr * initExpr ) {
+Expression * Mutator::mutate( UntypedInitExpr * initExpr ) {
 	initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) );
 	initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) );
@@ -452,5 +470,5 @@
 }
 
-Expression *Mutator::mutate( InitExpr * initExpr ) {
+Expression * Mutator::mutate( InitExpr * initExpr ) {
 	initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) );
 	initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) );
@@ -461,15 +479,15 @@
 
 
-Type *Mutator::mutate( VoidType *voidType ) {
+Type * Mutator::mutate( VoidType *voidType ) {
 	mutateAll( voidType->get_forall(), *this );
 	return voidType;
 }
 
-Type *Mutator::mutate( BasicType *basicType ) {
+Type * Mutator::mutate( BasicType *basicType ) {
 	mutateAll( basicType->get_forall(), *this );
 	return basicType;
 }
 
-Type *Mutator::mutate( PointerType *pointerType ) {
+Type * Mutator::mutate( PointerType *pointerType ) {
 	mutateAll( pointerType->get_forall(), *this );
 	pointerType->set_base( maybeMutate( pointerType->get_base(), *this ) );
@@ -477,5 +495,5 @@
 }
 
-Type *Mutator::mutate( ArrayType *arrayType ) {
+Type * Mutator::mutate( ArrayType *arrayType ) {
 	mutateAll( arrayType->get_forall(), *this );
 	arrayType->set_dimension( maybeMutate( arrayType->get_dimension(), *this ) );
@@ -484,5 +502,5 @@
 }
 
-Type *Mutator::mutate( FunctionType *functionType ) {
+Type * Mutator::mutate( FunctionType *functionType ) {
 	mutateAll( functionType->get_forall(), *this );
 	mutateAll( functionType->get_returnVals(), *this );
@@ -491,5 +509,5 @@
 }
 
-Type *Mutator::handleReferenceToType( ReferenceToType *aggregateUseType ) {
+Type * Mutator::handleReferenceToType( ReferenceToType *aggregateUseType ) {
 	mutateAll( aggregateUseType->get_forall(), *this );
 	mutateAll( aggregateUseType->get_parameters(), *this );
@@ -497,20 +515,20 @@
 }
 
-Type *Mutator::mutate( StructInstType *aggregateUseType ) {
+Type * Mutator::mutate( StructInstType *aggregateUseType ) {
 	handleReferenceToType( aggregateUseType );
 	return aggregateUseType;
 }
 
-Type *Mutator::mutate( UnionInstType *aggregateUseType ) {
+Type * Mutator::mutate( UnionInstType *aggregateUseType ) {
 	handleReferenceToType( aggregateUseType );
 	return aggregateUseType;
 }
 
-Type *Mutator::mutate( EnumInstType *aggregateUseType ) {
+Type * Mutator::mutate( EnumInstType *aggregateUseType ) {
 	handleReferenceToType( aggregateUseType );
 	return aggregateUseType;
 }
 
-Type *Mutator::mutate( TraitInstType *aggregateUseType ) {
+Type * Mutator::mutate( TraitInstType *aggregateUseType ) {
 	handleReferenceToType( aggregateUseType );
 	mutateAll( aggregateUseType->get_members(), *this );
@@ -518,10 +536,10 @@
 }
 
-Type *Mutator::mutate( TypeInstType *aggregateUseType ) {
+Type * Mutator::mutate( TypeInstType *aggregateUseType ) {
 	handleReferenceToType( aggregateUseType );
 	return aggregateUseType;
 }
 
-Type *Mutator::mutate( TupleType *tupleType ) {
+Type * Mutator::mutate( TupleType *tupleType ) {
 	mutateAll( tupleType->get_forall(), *this );
 	mutateAll( tupleType->get_types(), *this );
@@ -530,5 +548,5 @@
 }
 
-Type *Mutator::mutate( TypeofType *typeofType ) {
+Type * Mutator::mutate( TypeofType *typeofType ) {
 	assert( typeofType->get_expr() );
 	typeofType->set_expr( typeofType->get_expr()->acceptMutator( *this ) );
@@ -536,5 +554,5 @@
 }
 
-Type *Mutator::mutate( AttrType *attrType ) {
+Type * Mutator::mutate( AttrType *attrType ) {
 	if ( attrType->get_isType() ) {
 		assert( attrType->get_type() );
@@ -547,15 +565,15 @@
 }
 
-Type *Mutator::mutate( VarArgsType *varArgsType ) {
+Type * Mutator::mutate( VarArgsType *varArgsType ) {
 	mutateAll( varArgsType->get_forall(), *this );
 	return varArgsType;
 }
 
-Type *Mutator::mutate( ZeroType *zeroType ) {
+Type * Mutator::mutate( ZeroType *zeroType ) {
 	mutateAll( zeroType->get_forall(), *this );
 	return zeroType;
 }
 
-Type *Mutator::mutate( OneType *oneType ) {
+Type * Mutator::mutate( OneType *oneType ) {
 	mutateAll( oneType->get_forall(), *this );
 	return oneType;
@@ -563,15 +581,15 @@
 
 
-Designation *Mutator::mutate( Designation * designation ) {
+Designation * Mutator::mutate( Designation * designation ) {
 	mutateAll( designation->get_designators(), *this );
 	return designation;
 }
 
-Initializer *Mutator::mutate( SingleInit *singleInit ) {
+Initializer * Mutator::mutate( SingleInit *singleInit ) {
 	singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) );
 	return singleInit;
 }
 
-Initializer *Mutator::mutate( ListInit *listInit ) {
+Initializer * Mutator::mutate( ListInit *listInit ) {
 	mutateAll( listInit->get_designations(), *this );
 	mutateAll( listInit->get_initializers(), *this );
@@ -579,5 +597,5 @@
 }
 
-Initializer *Mutator::mutate( ConstructorInit *ctorInit ) {
+Initializer * Mutator::mutate( ConstructorInit *ctorInit ) {
 	ctorInit->set_ctor( maybeMutate( ctorInit->get_ctor(), *this ) );
 	ctorInit->set_dtor( maybeMutate( ctorInit->get_dtor(), *this ) );
@@ -587,10 +605,10 @@
 
 
-Subrange *Mutator::mutate( Subrange *subrange ) {
+Subrange * Mutator::mutate( Subrange *subrange ) {
 	return subrange;
 }
 
 
-Constant *Mutator::mutate( Constant *constant ) {
+Constant * Mutator::mutate( Constant *constant ) {
 	return constant;
 }
Index: src/SynTree/Mutator.h
===================================================================
--- src/SynTree/Mutator.h	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/SynTree/Mutator.h	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -49,4 +49,5 @@
 	virtual Statement* mutate( CatchStmt *catchStmt );
 	virtual Statement* mutate( FinallyStmt *catchStmt );
+	virtual Statement* mutate( WaitForStmt *waitforStmt );
 	virtual NullStmt* mutate( NullStmt *nullStmt );
 	virtual Statement* mutate( DeclStmt *declStmt );
Index: src/SynTree/Statement.cc
===================================================================
--- src/SynTree/Statement.cc	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/SynTree/Statement.cc	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -419,4 +419,52 @@
 }
 
+WaitForStmt::WaitForStmt( std::list<Label> labels ) : Statement( labels ) {
+	timeout.time      = nullptr;
+	timeout.statement = nullptr;
+	timeout.condition = nullptr;
+ 	orelse .statement = nullptr;
+	orelse .condition = nullptr;
+}
+
+WaitForStmt::WaitForStmt( const WaitForStmt & other ) : Statement( other ) {
+	clauses.reserve( other.clauses.size() );
+	for( auto & ocl : other.clauses ) {
+		clauses.emplace_back();
+		clauses.back().target.function = ocl.target.function->clone();
+		cloneAll( ocl.target.arguments, clauses.back().target.arguments );
+		clauses.back().statement = ocl.statement->clone();
+		clauses.back().condition = ocl.condition->clone();
+	}
+
+	timeout.time      = other.timeout.time     ->clone();
+	timeout.statement = other.timeout.statement->clone();
+	timeout.condition = other.timeout.condition->clone();
+	orelse .statement = other.orelse .statement->clone();
+	orelse .condition = other.orelse .condition->clone();
+}
+
+WaitForStmt::~WaitForStmt() {
+	for( auto & clause : clauses ) {
+		delete clause.target.function;
+		deleteAll( clause.target.arguments );
+		delete clause.statement;
+		delete clause.condition;
+	}
+
+	delete timeout.time;
+	delete timeout.statement;
+	delete timeout.condition;
+
+	delete orelse.statement;
+	delete orelse.condition;
+}
+
+void WaitForStmt::print( std::ostream &os, int indent ) const {
+	os << "Waitfor Statement" << endl;
+	os << string( indent + 2, ' ' ) << "with block:" << endl;
+	os << string( indent + 4, ' ' );
+	// block->print( os, indent + 4 );
+}
+
 NullStmt::NullStmt( std::list<Label> labels ) : CompoundStmt( labels ) {}
 NullStmt::NullStmt() : CompoundStmt( std::list<Label>() ) {}
Index: src/SynTree/Statement.h
===================================================================
--- src/SynTree/Statement.h	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/SynTree/Statement.h	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -19,4 +19,5 @@
 #include <list>                    // for list
 #include <memory>                  // for allocator
+#include <vector>	                 // for vector
 
 #include "BaseSyntaxNode.h"        // for BaseSyntaxNode
@@ -392,4 +393,42 @@
 };
 
+class WaitForStmt : public Statement {
+  public:
+
+	struct Target {
+		Expression * function;
+		std::list<Expression * > arguments;
+	};
+
+	struct Clause {
+		Target       target;
+		Statement  * statement;
+		Expression * condition;
+	};
+
+	WaitForStmt( std::list<Label> labels = noLabels );
+	WaitForStmt( const WaitForStmt & );
+	virtual ~WaitForStmt();
+
+	std::vector<Clause> clauses;
+
+	struct {
+		Expression * time;
+		Statement  * statement;
+		Expression * condition;
+	} timeout;
+
+	struct {
+		Statement  * statement;
+		Expression * condition;
+	} orelse;
+
+	virtual WaitForStmt *clone() const { return new WaitForStmt( *this ); }
+	virtual void accept( Visitor &v ) { v.visit( this ); }
+	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual void print( std::ostream &os, int indent = 0 ) const;
+
+};
+
 
 // represents a declaration that occurs as part of a compound statement
Index: src/SynTree/SynTree.h
===================================================================
--- src/SynTree/SynTree.h	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/SynTree/SynTree.h	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -54,4 +54,5 @@
 class CatchStmt;
 class FinallyStmt;
+class WaitForStmt;
 class NullStmt;
 class DeclStmt;
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/SynTree/Visitor.cc	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -155,4 +155,20 @@
 }
 
+void Visitor::visit( WaitForStmt *waitforStmt ) {
+	for( auto & clause : waitforStmt->clauses ) {
+		maybeAccept( clause.target.function, *this );
+		acceptAll( clause.target.arguments, *this );
+
+		maybeAccept( clause.statement, *this );
+		maybeAccept( clause.condition, *this );
+	}
+
+	maybeAccept( waitforStmt->timeout.time, *this );
+	maybeAccept( waitforStmt->timeout.statement, *this );
+	maybeAccept( waitforStmt->timeout.condition, *this );
+	maybeAccept( waitforStmt->orelse.statement, *this );
+	maybeAccept( waitforStmt->orelse.condition, *this );
+}
+
 void Visitor::visit( __attribute__((unused)) NullStmt *nullStmt ) {
 }
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/SynTree/Visitor.h	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -51,4 +51,5 @@
 	virtual void visit( CatchStmt *catchStmt );
 	virtual void visit( FinallyStmt *finallyStmt );
+	virtual void visit( WaitForStmt *waitforStmt );
 	virtual void visit( NullStmt *nullStmt );
 	virtual void visit( DeclStmt *declStmt );
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision 3eab0ef68502ef937f336ff8b65b6a8bb006b8bf)
+++ src/libcfa/concurrency/kernel.c	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -322,6 +322,6 @@
 void ScheduleThread( thread_desc * thrd ) {
 	// if( !thrd ) return;
-	assert( thrd );
-	assert( thrd->cor.state != Halted );
+	verify( thrd );
+	verify( thrd->cor.state != Halted );
 
 	verify( disable_preempt_count > 0 );
