public void ShouldParseIfThen() { var conditionExpression = new BracketedExpression(new ConstantExpression(Constants.False)); var emptyStatementBlock = new StatementBlock(new EmptyStatement()); var ifStatement = new IfStatement(conditionExpression, emptyStatementBlock); var expected = new StatementBlock(ifStatement); Assert.AreEqual(expected, SyntaxParser.Parse("if (false) then ; end")); }
public void ShouldParseIfThen() { var conditionExpression = new BracketedExpression(new ConstantExpression(Constants.False)); var emptyStatementBlock = new StatementBlock(new EmptyStatement()); var ifStatement = new IfStatement(conditionExpression, emptyStatementBlock); var expected = new StatementBlock(ifStatement); Assert.AreEqual(expected, SyntaxParser.Parse("if (false) then ; end")); }
public override ScalarValue VisitBracketedExpression(BracketedExpression node) { return(node.Expression.Accept(this)); }
public override T VisitBracketedExpression(BracketedExpression node) { throw new NotImplementedException(); }