src/helpers.c
// Parse all children's node looking for an instruction node
Parse all children's node looking for an instruction node
Parse all children ' s node looking for an instruction node
int containsInstruction(ANTLR3_BASE_TREE *tree) {
  ANTLR3_UINT32 count = tree->getChildCount(tree);
  int i;
	switch (tree->getType(tree)) {
		case LET :
		case IF :
		case WHILE :
		case FOR :
		case BREAK :
			return 1;
		default :
			for (i = 0; i < count; i++)
		  	containsInstruction(tree->getChild(tree, i));
	}
  return 0;
}
int containsInstruction ( ANTLR3_BASE_TREE * tree ) { ANTLR3_UINT32 count = tree -> getChildCount ( tree ) ; int i ; switch ( tree -> getType ( tree ) ) { case LET : case IF : case WHILE : case FOR : case BREAK : return 1 ; default : for ( i = 0 ; i < count ; i ++ ) containsInstruction ( tree -> getChild ( tree , i ) ) ; } return 0 ; }
Parse all children's node looking for an instruction node
Parse all children ' s node looking for an instruction node