diff --git a/source/tlang/commandline/lexer.d b/source/tlang/commandline/lexer.d index 239119d4..b4108281 100644 --- a/source/tlang/commandline/lexer.d +++ b/source/tlang/commandline/lexer.d @@ -38,6 +38,17 @@ public final class Lexer position++; } + else if(currentChar == ';' && !stringMode) + { + /* Flush the current token */ + currentTokens ~= currentToken; + currentToken = ""; + + /* Add the ; token */ + currentTokens ~= ";"; + + position++; + } else if(currentChar == '"') { /* If we are not in string mode */ diff --git a/source/tlang/compiler/compiler.d b/source/tlang/compiler/compiler.d index b1d69648..4567de80 100644 --- a/source/tlang/compiler/compiler.d +++ b/source/tlang/compiler/compiler.d @@ -15,7 +15,8 @@ void beginCompilation(string[] sourceFiles) gprintln("Performing tokenization on '"~sourceFile~"' ..."); /* TODO: Open source file */ - string sourceCode = "hello \"world\";"; + // string sourceCode = "hello \"world\";"; + string sourceCode = "hello;"; Lexer currentLexer = new Lexer(sourceCode); currentLexer.performLex();