fixed space skipping and decimal literals in Lexer

This commit is contained in:
Timerix22 2023-12-23 13:54:35 +06:00
parent 5907457907
commit 8fe03105b7
2 changed files with 3 additions and 1 deletions

View File

@ -55,10 +55,12 @@ class Lexer {
// try end token and skip current char
case ' ': case '\t': case '\n': case '\r':
TryEndToken();
tokBegin++;
break;
// move next
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case '.':
break;
// set type from Numeric to Literal
default:

View File

@ -7,7 +7,7 @@ public static class MainClass {
#endif
string() joined = "";
foreach(string arg in args){
joined += arg;
joined += arg + " ";
}
double rezult = Calculator.Calculate(joined);
Console.WriteLine(rezult);