Inheritance: IStatementNode
示例#1
0
 private StatementNode ParseStatement()
 {
     AssertHasType(TokenKind.Statement);
     var statement =  new StatementNode(tokenStream.Current.Value);
     tokenStream.MoveNext();
     return statement;
 }
示例#2
0
 private IDaisyAstNode ParseGroup(StatementNode head)
 {
     Consume(TokenKind.StartGroup);
     var groupInner = ParseExpression();
     Consume(TokenKind.EndGroup);
     if (head == null || head.Text == null)
         return groupInner;
     return new GroupOperatorNode(head.With(x => head.Text),
         groupInner);
 }