fixed space skipping and decimal literals in Lexer
This commit is contained in:
parent
5907457907
commit
8fe03105b7
@ -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:
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user