forked from mkhan45/RustScript
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9513f7f
commit 6b9c8b7
Showing
9 changed files
with
6 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
|
||
/** | ||
* @author William Rågstad <[email protected]> | ||
* @version 0.1.0 | ||
* | ||
* The CLI is a simple command line interface for the RustScript | ||
* language. It provides a simple way to run RustScript script files | ||
|
@@ -12,7 +11,7 @@ | |
* languages like JavaScript, C++ or Python. | ||
*/ | ||
public class Cli { | ||
private static final String VERSION = "0.1.0"; | ||
private static final String VERSION = "2.1.0"; | ||
private static final String DESCRIPTION = "A command line interface tool for the RustScript language."; | ||
private static final String COPYRIGHT = "Copyright (c) 2021 William Rågstad"; | ||
private static final String HELP = String.format(""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,7 @@ | |
import java.util.NoSuchElementException; | ||
|
||
/** | ||
* @author William Rågstad <[email protected]> | ||
* @version 0.1.0 | ||
* @author Mikail Khan <[email protected]>, William Rågstad <[email protected]> | ||
* | ||
* The REPL program lets you interact with the RustScript programming | ||
* language and run commands as you go. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
|
||
/** | ||
* @author William Rågstad <[email protected]> | ||
* @version 0.1.0 | ||
* | ||
* The Runner takes a set of input source code files as command line | ||
* argument, and interprets them by expression. Even if one file fails | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
/** | ||
* @author Mikail Khan <[email protected]> | ||
* @version 0.1.0 | ||
* | ||
* An Atom is any discrete variable, literal or not | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
/** | ||
* @author Mikail Khan <[email protected]> | ||
* @version 0.1.0 | ||
* | ||
* An expression, the AST of this language. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,7 @@ | |
import java.util.Scanner; | ||
|
||
/** | ||
* @author Mikail Khan <[email protected]> & William Rågstad | ||
* <[email protected]> | ||
* @version 0.1.0 | ||
* @author Mikail Khan <[email protected]>, William Rågstad <[email protected]> | ||
* | ||
* Because this is an expression based language we don't need to deal | ||
* with complicated scoping and whatnot. This keeps the interpreter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,7 @@ | |
import core.Expr.MatchCaseExpr; | ||
|
||
/** | ||
* @author Mikail Khan <[email protected]> | ||
* @version 0.1.0 | ||
* @author Mikail Khan <[email protected]>, William Rågstad <[email protected]> | ||
* | ||
* A Parser takes a String, tokenizes it using a Tokenizer, and then | ||
* converts the flat list of tokens into a meaningful Expr AST which | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
package core; | ||
|
||
/** | ||
* @author Mikail Khan <[email protected]> | ||
* @version 0.1.0 | ||
* @author Mikail Khan <[email protected]>, William Rågstad <[email protected]> | ||
* | ||
* A token | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,7 @@ | |
import java.util.ArrayList; | ||
|
||
/** | ||
* @author Mikail Khan <[email protected]> | ||
* @version 0.1.0 | ||
* @author Mikail Khan <[email protected]>, William Rågstad <[email protected]> | ||
* | ||
* The Tokenizer takes a String and turns it into a flat list of | ||
* Tokens. | ||
|