예제 #1
0
        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);
        }
예제 #2
0
 public void AppendOperationNode(string name, Runnable operation)
 {
     _currentOperation = new XElement("Operation",
                                      new XAttribute("name", name),
                                      new XAttribute("type", operation.GetType()));
     _currentComponentInstance.Add(_currentOperation);
 }
예제 #3
0
 /// <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);
 }