diff --git a/SMILEBASIC/SMILEBASIC.visualdproj b/SMILEBASIC/SMILEBASIC.visualdproj index 177f927..a8d9522 100644 --- a/SMILEBASIC/SMILEBASIC.visualdproj +++ b/SMILEBASIC/SMILEBASIC.visualdproj @@ -33,7 +33,7 @@ 0 0 0 - 0 + 1 0 0 0 @@ -44,7 +44,7 @@ 0 0 0 - 2.043 + 2 0 0 0 @@ -205,13 +205,10 @@ *.obj;*.cmd;*.build;*.json;*.dep - - - - - - - + + + + diff --git a/SMILEBASIC/main.d b/SMILEBASIC/main.d index 5c41e9f..a3a7d60 100644 --- a/SMILEBASIC/main.d +++ b/SMILEBASIC/main.d @@ -2,5 +2,6 @@ import std.stdio; int main(string[] argv) { writeln("Hello D-World!"); + readln(); return 0; } diff --git a/SMILEBASIC/parser.d b/SMILEBASIC/parser.d index 0cfbc60..426040c 100644 --- a/SMILEBASIC/parser.d +++ b/SMILEBASIC/parser.d @@ -51,8 +51,22 @@ class Lexical } unittest { - auto lex = new Lexical("1"); - + { + auto lex = new Lexical("1"); + assert(lex.empty() == false); + lex.popFront(); + auto token = lex.front(); + assert(token.type == TokenType.Integer); + assert(token.value.integerValue == 1); + } + { + auto lex = new Lexical("12345"); + assert(lex.empty() == false); + lex.popFront(); + auto token = lex.front(); + assert(token.type == TokenType.Integer); + assert(token.value.integerValue == 12345); + } } class Parser {