-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.lua
48 lines (42 loc) · 839 Bytes
/
types.lua
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
export type TextObject = TextLabel | TextBox
export type TokenName =
"background"
| "iden"
| "keyword"
| "builtin"
| "string"
| "number"
| "comment"
| "operator"
| "custom"
export type TokenColors = {
["background"]: Color3?,
["iden"]: Color3?,
["keyword"]: Color3?,
["builtin"]: Color3?,
["string"]: Color3?,
["number"]: Color3?,
["comment"]: Color3?,
["operator"]: Color3?,
["custom"]: Color3?,
}
export type HighlightProps = {
textObject: TextObject,
src: string?,
forceUpdate: boolean?,
lexer: Lexer?,
customLang: { [string]: string }?,
}
export type Lexer = {
scan: (src: string) -> () -> (string, string),
navigator: () -> any,
finished: boolean?,
}
export type ObjectData = {
Text: string,
Labels: { TextLabel },
Lines: { string },
Lexer: Lexer?,
CustomLang: { [string]: string }?,
}
return nil