public void Analyze_Function_ReturnsFunctionNode()
        {
            SyntaxNode root = new FunctionNode(new IdentifierNode("ln"), new List <SyntaxNode>
            {
                new IdentifierNode("e")
            });

            root = SemanticAnalyzer.Analyze(root, new Environment());

            Assert.AreEqual("ln(e)", root.ToString());
        }
Exemple #2
0
 public PrintedFunction(FunctionNode node, int currentLength)
 {
     Node     = node;
     Stringed = node.ToString();
     Midpoint = currentLength + (Stringed.Length / 2);
 }
Exemple #3
0
 private void AddNode(FunctionNode n)
 {
     AddNode(new Node {
         Id = n.Id.ToString(), Label = n.ToString()
     });
 }