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"));
 }
示例#2
0
        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"));
        }
示例#3
0
 public override ScalarValue VisitBracketedExpression(BracketedExpression node)
 {
     return(node.Expression.Accept(this));
 }
示例#4
0
 public override T VisitBracketedExpression(BracketedExpression node)
 {
     throw new NotImplementedException();
 }