stuff (nearly crashing)
This commit is contained in:
@@ -33,6 +33,8 @@ struct _SolsTokenTypeMap SolsTokenTypeMap[] = {
|
||||
{"<", STT_OP_LESSER},
|
||||
{">=", STT_OP_EQGREATER},
|
||||
{"<=", STT_OP_EQLESSER},
|
||||
{"\n", STT_LINE_END},
|
||||
{";", STT_LINE_END},
|
||||
// Shh, this is our little secret
|
||||
// Your reward for actually reading the source code
|
||||
// Enable this by adding -DSUPER_SILLY_MODE to your
|
||||
@@ -472,6 +474,8 @@ ResultType(Nothing, charptr) lex(SolsLexer* lexer) {
|
||||
case ')':
|
||||
case ',':
|
||||
case ':':
|
||||
case ';':
|
||||
case '\n':
|
||||
{
|
||||
if (strcmp(buf.str, "") != 0) {
|
||||
ResultType(SolsToken, charptr) result = identifyToken(buf.str);
|
||||
@@ -714,7 +718,7 @@ ResultType(Nothing, charptr) lex(SolsLexer* lexer) {
|
||||
}
|
||||
|
||||
// This whitespace splits the program and does not get appended as it's own token.
|
||||
case '\n':
|
||||
case '\t':
|
||||
case ' ': {
|
||||
if (strcmp(buf.str, "") != 0) {
|
||||
ResultType(SolsToken, charptr) result = identifyToken(buf.str);
|
||||
|
||||
Reference in New Issue
Block a user