-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the tokeniser a bit more flexible
- Loading branch information
1 parent
319f6ec
commit 1698a57
Showing
5 changed files
with
124 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// ReSharper disable MemberCanBePrivate.Global | ||
namespace Sledge.Formats.Valve | ||
{ | ||
public static class ValveSymbols | ||
{ | ||
public const char Bang = '!'; | ||
public const char At = '@'; | ||
public const char Hash = '#'; | ||
public const char Dollar = '$'; | ||
public const char Percent = '%'; | ||
public const char Caret = '^'; | ||
public const char Ampersand = '&'; | ||
public const char Star = '*'; | ||
|
||
public const char OpenParen = '('; | ||
public const char CloseParen = ')'; | ||
public const char OpenBracket = '['; | ||
public const char CloseBracket = ']'; | ||
public const char OpenBrace = '{'; | ||
public const char CloseBrace = '}'; | ||
|
||
public const char Equal = '='; | ||
public const char Plus = '+'; | ||
public const char Minus = '-'; | ||
public const char Underscore = '_'; | ||
public const char Backslash = '/'; | ||
public const char Pipe = '|'; | ||
public const char Colon = ':'; | ||
public const char Semicolon = ';'; | ||
public const char DoubleQuote = '"'; | ||
public const char SingleQuote = '\''; | ||
|
||
public const char Comma = ','; | ||
public const char Dot = ','; | ||
public const char Slash = '/'; | ||
public const char Less = '<'; | ||
public const char Greater = '>'; | ||
public const char Question = '?'; | ||
|
||
public static char[] All = new [] | ||
{ | ||
Bang, | ||
At, | ||
Hash, | ||
Dollar, | ||
Percent, | ||
Caret, | ||
Ampersand, | ||
Star, | ||
OpenParen, | ||
CloseParen, | ||
OpenBracket, | ||
CloseBracket, | ||
OpenBrace, | ||
CloseBrace, | ||
Equal, | ||
Plus, | ||
Minus, | ||
Underscore, | ||
Backslash, | ||
Pipe, | ||
Colon, | ||
Semicolon, | ||
DoubleQuote, | ||
SingleQuote, | ||
Comma, | ||
Dot, | ||
Slash, | ||
Less, | ||
Greater, | ||
Question, | ||
}; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -3,8 +3,7 @@ | |
internal enum ValveTokenType | ||
{ | ||
Invalid, | ||
Open, | ||
Close, | ||
Symbol, | ||
Name, | ||
String, | ||
End | ||
|
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