Fix newline issue in generator
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Nub.Lang.Backend;
|
|||||||
|
|
||||||
public class Generator
|
public class Generator
|
||||||
{
|
{
|
||||||
private const string OutOfBoundsMessage = "Index is out of bounds\n";
|
private const string OutOfBoundsMessage = "Index is out of bounds\\n";
|
||||||
|
|
||||||
private List<SourceFile> _sourceFiles = [];
|
private List<SourceFile> _sourceFiles = [];
|
||||||
private StringBuilder _builder = new();
|
private StringBuilder _builder = new();
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ public static class ConsoleColors
|
|||||||
public const string Cyan = "\e[36m";
|
public const string Cyan = "\e[36m";
|
||||||
public const string White = "\e[37m";
|
public const string White = "\e[37m";
|
||||||
|
|
||||||
public const string LightBlue = "\e[94m";
|
|
||||||
|
|
||||||
public const string BrightBlack = "\e[90m";
|
public const string BrightBlack = "\e[90m";
|
||||||
public const string BrightRed = "\e[91m";
|
public const string BrightRed = "\e[91m";
|
||||||
public const string BrightGreen = "\e[92m";
|
public const string BrightGreen = "\e[92m";
|
||||||
@@ -78,7 +76,7 @@ public static class ConsoleColors
|
|||||||
|
|
||||||
if (literal.Type.Equals(NubPrimitiveType.I64) || literal.Type.Equals(NubPrimitiveType.F64))
|
if (literal.Type.Equals(NubPrimitiveType.I64) || literal.Type.Equals(NubPrimitiveType.F64))
|
||||||
{
|
{
|
||||||
return LightBlue;
|
return BrightBlue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (literal.Type.Equals(NubPrimitiveType.Bool))
|
if (literal.Type.Equals(NubPrimitiveType.Bool))
|
||||||
@@ -132,7 +130,7 @@ public static class ConsoleColors
|
|||||||
case Symbol.CloseBrace:
|
case Symbol.CloseBrace:
|
||||||
case Symbol.OpenBracket:
|
case Symbol.OpenBracket:
|
||||||
case Symbol.CloseBracket:
|
case Symbol.CloseBracket:
|
||||||
return BrightYellow;
|
return Yellow;
|
||||||
default:
|
default:
|
||||||
return White;
|
return White;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user