forked from Semaeopus/Unity-Lua
-
Notifications
You must be signed in to change notification settings - Fork 1
/
LuaAttributes.cs
57 lines (52 loc) · 1.47 KB
/
LuaAttributes.cs
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
using System;
/// <summary>
/// Used to document lua apis
/// </summary>
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public class LuaApi : Attribute
{
public string luaName = string.Empty;
public string description = string.Empty;
public string notes = string.Empty;
}
/// <summary>
/// Used to document lua functions
/// </summary>
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public class LuaApiFunction : Attribute
{
public string name = string.Empty;
public string description = string.Empty;
public string returns = string.Empty;
public string notes = string.Empty;
public string warning = string.Empty;
public string success = string.Empty;
public string codeExample = string.Empty;
}
/// <summary>
/// Used to document lua variables
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public class LuaApiVariable : Attribute
{
public string name = string.Empty;
public string description = string.Empty;
}
/// <summary>
/// Used for generating lua counterparts to C# enums as well as document them
/// </summary>
[AttributeUsage(AttributeTargets.Enum)]
public class LuaApiEnum : Attribute
{
public string name = string.Empty;
public string description = string.Empty;
}
/// <summary>
/// Used to document enum values
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public class LuaApiEnumValue : Attribute
{
public string description = string.Empty;
public bool hidden = false;
}