public void Display() { LexemToken curr = head; while (curr != null) { Console.Write(curr.lexem + ", "); Console.Write(curr.token + ", "); Console.WriteLine(curr.cLine); Console.WriteLine("---------------------------------------------------"); curr = curr.Next; } }
public void Add(string lexem, Token token, int cLine) { LexemToken node = new LexemToken(lexem, token, cLine); if (head == null) { head = node; } else { tail.Next = node; } tail = node; }