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()); }
public PrintedFunction(FunctionNode node, int currentLength) { Node = node; Stringed = node.ToString(); Midpoint = currentLength + (Stringed.Length / 2); }
private void AddNode(FunctionNode n) { AddNode(new Node { Id = n.Id.ToString(), Label = n.ToString() }); }