-
Notifications
You must be signed in to change notification settings - Fork 346
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
0b20720
commit 82d0175
Showing
15 changed files
with
681 additions
and
473 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
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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace Bloxstrap.Enums | ||
{ | ||
public enum FlexTokenType | ||
{ | ||
// data types | ||
NULL, | ||
NUMBER, | ||
BOOL, | ||
STRING, | ||
FLAG, | ||
|
||
// comparison operators | ||
COMPARE_EQ, | ||
COMPARE_NEQ, | ||
COMPARE_GT, | ||
COMPARE_LT, | ||
COMPARE_GEQ, | ||
COMPARE_LEQ, | ||
|
||
// boolean logic operators | ||
LOGIC_AND, | ||
LOGIC_OR, | ||
|
||
// yes, "bracket" is technically not the correct term, don't care | ||
BRACKET_OPEN, | ||
BRACKET_CLOSE | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Bloxstrap.Exceptions | ||
{ | ||
internal class FlexParseException : Exception | ||
{ | ||
public FlexParseException(string expression, string message, string? position = null) | ||
: base($"Invalid syntax encountered when parsing '{expression}' at position {position ?? "EOF"} ({message})") { } | ||
|
||
public FlexParseException(string expression, string message, int position) | ||
: this(expression, message, position.ToString()) { } | ||
|
||
public FlexParseException(string expression, string message, FlexToken? token) | ||
: this(expression, message, token?.Position.ToString()) { } | ||
} | ||
} |
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
Oops, something went wrong.