aboutsummaryrefslogtreecommitdiffstats
path: root/code/editor/editor_tree.h
blob: cf861083b6fe764bd7a9be9431123b6cc0769a74 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef EDITOR_TREE_VISUALIZER_H
#define EDITOR_TREE_VISUALIZER_H

typedef struct v_node v_node;
struct v_node
{
  v2 Pos;

  v2 Size;

  str8 Label;

  v4      Color;
  v_node *Parent;
  v_node *NextVNode;
  v_node *First;
  v_node *Last;

  token  *Token;
};

typedef struct debug_tree debug_tree;
struct debug_tree
{
  v_node *Root;
  v_node *Current;
  // TODO(nasr): using the same struct everywhere find a way to simplify them
};

read_only global_variable v_node nil_v_node =
{
.Pos       = 0,
.Size      = 0,
.Label     = {NULL, 0},
.Color     = 0,
.Parent    = NULL,
.NextVNode = NULL,
.First     = NULL,
.Last      = NULL,

};

read_only global_variable debug_tree nil_debug_tree =
{
.Root    = NULL,
.Current = NULL,
};

#endif // EDITOR_TREE_VISUALIZER_H