private Node ParseBlock() { var node = new Node.Block(); node.AddSpan(this.Expect(TokenKind.BraceOpen).span); this.insideCondition.Push(false); node.exprs = this.ParseList(TokenKind.Semicolon, TokenKind.BraceClose, this.ParseExpr); this.insideCondition.Pop(); node.AddSpan(this.Previous.span); return(node); }
public static Node.Block Parse() { Node.Block n; Match(Tokens.Operator, Lexemes.BraceOpen); n = new Node.Block { S = Parser.Sequence.Parse(), Label = null }; Match(Tokens.Operator, Lexemes.BraceClose); return(n); }
private Types.Object EvaluateBlock(Node.Block node) { return(Evaluate(node.S).Itself); }