blob: 24818e019fc65afb481d3cc1c191b133403fbcc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
using System;
using System.Collections.Generic;
namespace Crow.Coding
{
public class Node
{
public Node Parent;
public string Name;
public string Type;
public CodeLine StartLine;
public CodeLine EndLine;
public Dictionary<string,string> Attributes = new Dictionary<string, string> ();
public List<Node> Children = new List<Node>();
public Node ()
{
}
public void AddChild (Node child) {
child.Parent = this;
Children.Add (child);
}
public override string ToString ()
{
return string.Format ("Name:{0}, Type:{1}\n\tparent:{2}", Name, Type, Parent);
}
}
}
|