This commit is contained in:
@@ -37,10 +37,10 @@ namespace Assignment_1
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("┌──────────────────────────────────────────┐");
|
||||
Console.WriteLine("│ 159.341 2021 Semester 1, Assignment 1 │");
|
||||
Console.WriteLine("│ Submitted by Brychan Dempsey, 14299890 │");
|
||||
Console.WriteLine("└──────────────────────────────────────────┘");
|
||||
Console.WriteLine("┌──────────────────────────────────────────────┐");
|
||||
Console.WriteLine("│ 159.341 2021 Semester 1, Assignment 1 (C#) │");
|
||||
Console.WriteLine("│ Submitted by Brychan Dempsey, 14299890 │");
|
||||
Console.WriteLine("└──────────────────────────────────────────────┘");
|
||||
// Parse the source from the memory stream
|
||||
bool exit = false;
|
||||
while (!exit)
|
||||
@@ -185,6 +185,8 @@ namespace Assignment_1
|
||||
{
|
||||
// By turning the result of the command into an action,
|
||||
// we can defer processing the final result until the end of this control flow
|
||||
// This simplifies parsing the eol, and prevents the result being processed too
|
||||
// optimistically.
|
||||
Action result = () => { };
|
||||
source.Position = position;
|
||||
switch ((Statements)statementType)
|
||||
@@ -428,7 +430,7 @@ namespace Assignment_1
|
||||
}
|
||||
Action Exit(Stream source, long initialStreamLength, bool isDynamicInput=false)
|
||||
{
|
||||
Action exitAction = () =>
|
||||
void exitAction()
|
||||
{
|
||||
if (source.Length != initialStreamLength && isDynamicInput)
|
||||
{
|
||||
@@ -457,7 +459,7 @@ namespace Assignment_1
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
return exitAction;
|
||||
}
|
||||
Action Print(Stream source, int mode = 0)
|
||||
|
||||
Reference in New Issue
Block a user