-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAstnode.h
More file actions
63 lines (61 loc) · 1.07 KB
/
Astnode.h
File metadata and controls
63 lines (61 loc) · 1.07 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
namespace sqf
{
namespace parse
{
struct astnode;
}
}
namespace SqfVm {
public enum class SqfAstnodeType
{
NA = 0,
SQF,
STATEMENT,
ASSIGNMENT,
ASSIGNMENTLOCAL,
BEXP1,
BEXP2,
BEXP3,
BEXP4,
BEXP5,
BEXP6,
BEXP7,
BEXP8,
BEXP9,
BEXP10,
BINARYEXPRESSION,
BINARYOP,
BRACKETS,
PRIMARYEXPRESSION,
NULAROP,
UNARYEXPRESSION,
UNARYOP,
NUMBER,
HEXNUMBER,
VARIABLE,
STRING,
CODE,
ARRAY
};
public ref class Astnode
{
private:
System::Collections::Generic::List<Astnode^>^ m_children;
size_t m_offset;
size_t m_length;
size_t m_line;
size_t m_col;
short m_kind;
System::String^ m_file;
public:
Astnode(::sqf::parse::astnode& base);
System::Collections::Generic::List<Astnode^>^ GetChildren() { return m_children; }
size_t GetOffset() { return m_offset; }
size_t GetLength() { return m_length; }
size_t GetLine() { return m_line; }
size_t GetColumn() { return m_col; }
SqfAstnodeType GetSqfNodeType() { return static_cast<SqfAstnodeType>(m_kind); }
System::String^ GetFile() { return m_file; }
};
}