forked from neolithos/neolua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLuaDebug.cs
59 lines (50 loc) · 1.85 KB
/
LuaDebug.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
58
59
using System;
using System.Linq.Expressions;
namespace Neo.IronLua
{
#region -- enum LuaDebugLevel -------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
/// <summary>Descripes the debug-level.</summary>
[Flags]
public enum LuaDebugLevel
{
/// <summary>No debug info will be emitted.</summary>
None,
/// <summary>Before every new line is a DebugInfo emitted (Line exact).</summary>
Line = 1,
/// <summary>Every expression is wrap by a DebugInfo (Column exact).</summary>
Expression = 2,
/// <summary>Registriert die Methoden</summary>
RegisterMethods = 4
} // enum LuaDebugLevel
#endregion
#region -- interface ILuaDebug ------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
/// <summary></summary>
public interface ILuaDebug
{
/// <summary>Create the chunk</summary>
/// <param name="expr">Content of the chunk.</param>
/// <param name="lua"></param>
/// <returns></returns>
LuaChunk CreateChunk(Lua lua, LambdaExpression expr);
/// <summary>How should the parser emit the DebugInfo's</summary>
LuaDebugLevel Level { get; }
} // interface ILuaDebug
#endregion
#region -- interface ILuaDebugInfo --------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
/// <summary>Information about a position.</summary>
public interface ILuaDebugInfo
{
/// <summary>Name of the chunk.</summary>
string ChunkName { get; }
/// <summary>Source of the position.</summary>
string FileName { get; }
/// <summary>Line</summary>
int Line { get; }
/// <summary>Column</summary>
int Column { get; }
} // interface ILuaDebugInfo
#endregion
}