Browse Source

Making the improvised tokenization a bit easier to use until a real tokenizer is used.

David Piuva 3 years ago
parent
commit
0519cdb16a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/tools/builder/Machine.cpp

+ 2 - 1
Source/tools/builder/Machine.cpp

@@ -218,7 +218,8 @@ void evaluateScript(ScriptTarget &output, ProjectContext &context, Machine &targ
 				// Insert character into quote.
 				string_appendChar(currentToken, c);
 			} else {
-				if (c == U'(' || c == U')' || c == U'[' || c == U']' || c == U'{' || c == U'}' || c == U'=') {
+				// TODO: Do the tokenization in the expression module to get the correct symbols.
+				if (c == U'(' || c == U')' || c == U'[' || c == U']' || c == U'{' || c == U'}' || c == U'=' || c == U'.' || c == U',' || c == U'|' || c == U'!' || c == U'&' || c == U'+' || c == U'-' || c == U'*' || c == U'/' || c == U'\\') {
 					// Atomic token of a single character
 					flushToken(currentLine, currentToken);
 					string_appendChar(currentToken, c);