.NAME No empty then

.DESCRIPTION
The then part of an if structure shall not be empty.

.SEVERITY Required

.COMMAND tcl

.CODE

::logiscope::include -once common utilities.tcl

proc compute {standardName tree} {
	
	# find the operators in the tree that are eq or neq operators
	::utilities::filterTree $tree [list [namespace current]::checkIf]

}

proc checkIf { tree } {

	if { [::utilities::isTreeOperator $tree if] } {
		set then [::logiscope::treeGetSon $tree STMTS]
		if { [::utilities::isTreeOperator [lindex [::logiscope::treeGetSon $then STMT_AND_DECL*] 0] empty_stmt] } {
			::logiscope::addViolation $tree
			return 0
		}
	}
	return 1
}

