Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
Make CASCRepl accessible from main progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ChAoSUnItY committed Jan 31, 2021
1 parent 1918d15 commit 5a00525
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
12 changes: 11 additions & 1 deletion src/CASC-Compiler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ private static void Main(string[] args)
{
if (args.Length == 0)
{
Console.Error.WriteLine("Usage: casc <source-path>");
Console.Error.WriteLine(
"Usage: casc <source-directory-path>\n or casc repl\nIf you are running CASC by local executable file,\nconsider adds arguments behind the excutable file."
);
return;
}

if (string.Equals(args[0], "repl"))
{
var repl = new CASCRepl();
repl.Run();
return;
}


var paths = GetFilePaths(args);
var syntaxTrees = new List<SyntaxTree>();
var hasError = false;
Expand Down
3 changes: 1 addition & 2 deletions src/CASC-Console/CASCRepl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
using System.Collections.Generic;
using System.Linq;
using System;
using CASC.CodeParser.Text;
using CASC.CodeParser.Symbols;
using CASC.IO;

namespace CASC
{
internal sealed class CASCRepl : Repl
public sealed class CASCRepl : Repl
{
private Compilation _previous;
private bool _showTree;
Expand Down
2 changes: 1 addition & 1 deletion src/CASC-Console/Repl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace CASC
{
internal abstract class Repl
public abstract class Repl
{
private List<string> _submissionHistory = new List<string>();
private int _submissionHistoryIndex;
Expand Down

0 comments on commit 5a00525

Please sign in to comment.