summaryrefslogtreecommitdiff
path: root/lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.cpp')
-rw-r--r--lexer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lexer.cpp b/lexer.cpp
index 26432ae..98fb0a6 100644
--- a/lexer.cpp
+++ b/lexer.cpp
@@ -38,6 +38,12 @@ bool Lexer::matchFunction(const string &function_name){
string Lexer::createNumber(){
string number;
+ if(text[current_char] == '0') {
+ ++current_char;
+
+ return "0";
+ }
+
while(isdigit(text[current_char]) && current_char < text.length())
{
number += text[current_char];