 			ST_IF, ST_FOR, ST_FOR_EACH, ST_WHILE, ST_SWITCH, ST_CATCH
 		];
 
-		private static const _PARAMS:String = 'PARAMS'; // must be enclosed in ()
-		private static const _STMT:String = 'STMT'; // may contain multiple statements enclosed in {}
-		private static const _EXPR:String = 'EXPR'; // may only contain one expression, optionally enclosed in (), no statements
-		// longer patterns appear earlier so they will match before shorter patterns when checked in order
+		/**
+		 * must be enclosed in () with expressions separated by ;
+		 * Used in conjunction with _validStatementPatterns.
+		 */
+		private static const _PARAMS:String = 'PARAMS';
+		
+		/**
+		 * MUST be a {} code block.
+		 * Used in conjunction with _validStatementPatterns.
+		 */
+		private static const _BLOCK:String = 'BLOCK';
+		
+		/**
+		 * may contain either a single statement or a {} code block.
+		 * Used in conjunction with _validStatementPatterns.
+		 */
+		private static const _STMT:String = 'STMT';
+		
+		/**
+		 * may only contain one expression, optionally enclosed in (), no statements.
+		 * Used in conjunction with _validStatementPatterns.
+		 */
+		private static const _EXPR:String = 'EXPR';
+		
+		/**
+		 * longer patterns appear earlier so they will match before shorter patterns when checked in order
+		 */
 		private static const _validStatementPatterns:Array = [
 			[ST_IF, _PARAMS, _STMT, ST_ELSE, _STMT],
 			[ST_IF, _PARAMS, _STMT],

		private function compileStatements(tokens:Array, startIndex:int = 0):void
		{
			return;
			// TODO: use _validStatementPatterns
			//TODO: if first token is a statement, then use _validStatementPatterns.  any leftover tokens means there is an error
			// determine types of all tokens, then array compare on items in _validStatementParams.
			
			
			var i:int;
			var j:int;
			var stmt:String;
			
			if (startIndex == 0)
			{
				// verify that everything except statements have been compiled and that statements have the correct number of parameters
				for (i = 0; i < tokens.length; i++)
				{
					if (tokens[i] is ICompiledObject)
					{
						// ok
					}
					else if (statements.hasOwnProperty(tokens[i]))
					{
						assertValidStatementParams(tokens, i);
					}
					else
						throw new Error("Unexpected token: " + tokens[i]);
				}
			}
			
			i = findNextStatement(tokens, startIndex);
			
			// stop when there are no statements
			if (i >= tokens.length)
				return;
			
			stmt = tokens[i];
			if (statements[stmt]) // requires params.  Example:  if () {}
			{
				compileStatements(tokens, i + 2);
			}
			else // no params.  Example:  else {}
			{
				compileStatements(tokens, i + 1);
			}
			
			// now everything to the right of the current statement and its params have been taken care of.
			
			var cfc:CompiledFunctionCall;

			[ST_FOR, _PARAMS, _STMT],
			[ST_DO, _STMT, ST_WHILE, _PARAMS],
			[ST_WHILE, _PARAMS, _STMT],
			[ST_TRY, _BLOCK, ST_CATCH, _PARAMS, _BLOCK, ST_FINALLY, _BLOCK],
			[ST_TRY, _BLOCK, ST_FINALLY, _BLOCK],
			[ST_TRY, _BLOCK, ST_CATCH, _PARAMS, _BLOCK],
			[ST_BREAK],
			[ST_CONTINUE],
			[ST_RETURN, _EXPR],
