private List <Runnable> statementList() { List <Runnable> statements = new List <Runnable>(); Runnable node = statement(); statements.Add(node); while (currentToken.type() == TokenType.SEMI || currentToken.type() == TokenType.COLON) { if (currentToken.type() == TokenType.SEMI) { eat(TokenType.SEMI); } else { eat(TokenType.COLON); } node = statement(); if (node.GetType() != typeof(NoOp)) { statements.Add(node); } else { break; } } return(statements); }
public void AppendOperationNode(string name, Runnable operation) { _currentOperation = new XElement("Operation", new XAttribute("name", name), new XAttribute("type", operation.GetType())); _currentComponentInstance.Add(_currentOperation); }
/// <summary>Returns the class name of the wrapper callable/runnable.</summary> /// <returns>the class name of the wrapper callable/runnable.</returns> public override string ToString() { return((runnable != null) ? runnable.GetType().Name : callable.GetType().Name); }