mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-05 23:42:45 +02:00
Add more statements and bug fixes
Add `Execute(List<string>...` method to interpreter Add escape sequence (`!!`) Fix `Evaluator.Calulate` method not correctly handling `-` and `+` prefixes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace YesNt.CodeEditor
|
||||
{
|
||||
@@ -124,11 +125,14 @@ namespace YesNt.CodeEditor
|
||||
textEditor.Lines.Add("");
|
||||
}
|
||||
|
||||
while (textEditor.Lines[textEditor.CursorPosition.Y].Length <= textEditor.CursorPosition.X)
|
||||
StringBuilder lineBuilder = new StringBuilder(textEditor.Lines[textEditor.CursorPosition.Y]);
|
||||
while (lineBuilder.Length <= textEditor.CursorPosition.X)
|
||||
{
|
||||
textEditor.Lines[textEditor.CursorPosition.Y] += " ";
|
||||
lineBuilder.Append(' ');
|
||||
}
|
||||
|
||||
textEditor.Lines[textEditor.CursorPosition.Y] = lineBuilder.ToString();
|
||||
|
||||
if (keyInfo.Key == ConsoleKey.Backspace)
|
||||
{
|
||||
if (textEditor.CursorPosition.X > 0)
|
||||
@@ -307,7 +311,7 @@ namespace YesNt.CodeEditor
|
||||
return true;
|
||||
}
|
||||
|
||||
public void WriteStatus(string input)
|
||||
internal static void WriteStatus(string input)
|
||||
{
|
||||
Console.SetCursorPosition(0, Console.WindowHeight - 1);
|
||||
Console.Write(input + new string(' ', Console.WindowWidth - input.Length - 1));
|
||||
|
||||
Reference in New Issue
Block a user