- Add function in and out parameters

This commit is contained in:
Stone_Red
2022-01-11 19:08:15 +01:00
parent 2a7e8074ba
commit 895eb51c8d
4 changed files with 165 additions and 94 deletions
+4 -1
View File
@@ -6,10 +6,13 @@ namespace YesNt.Interpreter.Runtime
{
public int CallerLine { get; }
public Dictionary<string, string> Variables { get; } = new();
public Stack<string> Arguemtns { get; } = new();
public Stack<string> Results { get; } = new();
public FunctionScope(int callerLine)
public FunctionScope(int callerLine, Stack<string> arguemtns)
{
CallerLine = callerLine;
Arguemtns = arguemtns;
}
}
}
@@ -17,6 +17,8 @@ namespace YesNt.Interpreter
public Dictionary<string, int> Labels { get; } = new();
public Dictionary<string, int> Functions { get; } = new();
public Stack<FunctionScope> FunctionCallStack { get; } = new();
public Stack<string> InParametersStack { get; } = new();
public Stack<string> OutParametersStack { get; set; } = new();
public List<string> Lines { get; set; } = new();
public string CurrentLine { get; set; } = string.Empty;
public string SearchLabel { get; set; } = string.Empty;