-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.proto
More file actions
119 lines (100 loc) · 1.5 KB
/
schema.proto
File metadata and controls
119 lines (100 loc) · 1.5 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
syntax = "proto3";
package cgeparser;
option go_package = "./protobuf/schema";
message msg_type {
enum Type {
METADATA = 0;
DIAGNOSTIC = 1;
TOKEN = 2;
OBJECT = 3;
}
Type type = 1;
}
message Metadata {
string cge_version = 1;
}
message Diagnostic {
enum Type {
INFO = 0;
WARNING = 1;
ERROR = 2;
}
Type type = 1;
string msg = 2;
// inclusive
Pos start = 3;
// exclusive
Pos end = 4;
}
message Token {
enum Type {
TTGameName = 0;
TTCGEVersion = 1;
TTConfig = 2;
TTCommand = 3;
TTEvent = 4;
TTType = 5;
TTEnum = 6;
TTString = 7;
TTBool = 8;
TTInt32 = 9;
TTInt64 = 10;
TTFloat32 = 11;
TTFloat64 = 12;
TTMap = 13;
TTList = 14;
TTIdentifier = 15;
TTVersionNumber = 16;
TTOpenCurly = 17;
TTCloseCurly = 18;
TTColon = 19;
TTComma = 20;
TTGreater = 21;
TTLess = 22;
TTComment = 23;
TTError = 24;
TTEOF = 25;
}
Type type = 1;
string lexeme = 2;
Pos pos = 3;
}
message Pos {
int32 line = 1;
int32 column = 2;
}
message Object {
enum Type {
CONFIG = 0;
COMMAND = 1;
EVENT = 2;
TYPE = 3;
ENUM = 4;
}
Type type = 1;
string name = 2;
repeated Property properties = 3;
optional string comment = 4;
}
message Property {
message Type {
enum DataType {
STRING = 0;
BOOL = 1;
INT32 = 2;
INT64 = 3;
FLOAT32 = 4;
FLOAT64 = 5;
MAP = 6;
LIST = 7;
ENUM_VALUE = 8;
CUSTOM = 9;
}
string name = 1;
DataType type = 2;
Type generic = 3;
}
string name = 1;
Type type = 2;
optional string comment = 3;
}