public static void compile(LinkedListNode<Token> firstToken) { CompiledStatement cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken); Compiled = cs.compile(ref firstToken); ActionNode a = Compiled.First; while (a != null) { Console.WriteLine(a.GetType()); a = a.Next; } }
public void Run(NodeLinkedList list) { ActionNode currentNode = list.First; while(currentNode != null) { // Doe iets met de huidige node: // Command pattern // Bepaal de volgende node: // Visitor pattern } }
public void Run(NodeLinkedList list) { ActionNode currentNode = list.First; variables = new Dictionary<string, Variable>(); NodeVisitor visitor = new NodeVisitor(this); while(currentNode != null) { currentNode.accept(visitor); currentNode = currentNode.Next; // Doe iets met de huidige node: // Command pattern // Bepaal de volgende node: // Visitor pattern } }
public static NodeLinkedList compile(LinkedListNode<Token> firstToken) { CompiledStatement cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken); Compiled = cs.compile(ref firstToken); while (firstToken != null) { cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken); NodeLinkedList nll = cs.compile(ref firstToken); Compiled.Add(nll); } ActionNode a = Compiled.First; while (a != null) { Console.WriteLine(a.GetType()); a = a.Next; } return Compiled; }
public static NodeLinkedList compile(LinkedListNode <Token> firstToken) { CompiledStatement cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken); Compiled = cs.compile(ref firstToken); while (firstToken != null) { cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken); NodeLinkedList nll = cs.compile(ref firstToken); Compiled.Add(nll); } ActionNode a = Compiled.First; while (a != null) { Console.WriteLine(a.GetType()); a = a.Next; } return(Compiled); }
public CompiledStatement() { Compiled = new NodeLinkedList(); }
public CompiledStatement() { Compiled = new NodeLinkedList(); }
public void Add(NodeLinkedList nll) { last.Next = nll.first; nll.first.Prev = last; last = nll.last; }
public void Add(NodeLinkedList nll) { last.Next = nll.first; nll.first.Prev = last; last = nll.last; }