예제 #1
0
        public void Should_evaluate_false_for_nil()
        {
            var inputNode = new NilNode();
            var evaluator = new BooleanEvaluator();
            var result    = evaluator.Eval(inputNode);

            result.ShouldBeOfType <FalseNode>();
        }
예제 #2
0
 private void PrettyPrintSub(NilNode node)
 {
     stringWriter.Write("nil");
 }
예제 #3
0
 private Expression Build(NilNode node)
 {
     return(Expression.Constant(null));
 }
예제 #4
0
 public void VisitNil(NilNode node)
 {
     UpdateLine(node);
     asm.PushNil();
 }
예제 #5
0
 public bool VisitNilNode(NilNode node, CompilationState state)
 {
     state.Write("nil");
     return(true);
 }
예제 #6
0
 private Expression Build(NilNode node) => Constant(null);
예제 #7
0
 public void VisitNil(NilNode n)
 {
     Console.WriteLine($"Nil node: {n}");
 }
예제 #8
0
 public NilNodeTests()
 {
     subject = new NilNode(new SourcePosition(2, 4));
 }
예제 #9
0
 public void VisitNil(NilNode node)
 {
     VisitNilHandler(node);
 }