summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Sencha-lang/Lexer.cpp')
-rw-r--r--Sencha-lang/Lexer.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/Sencha-lang/Lexer.cpp b/Sencha-lang/Lexer.cpp
index 5c8f42c..4c7327b 100644
--- a/Sencha-lang/Lexer.cpp
+++ b/Sencha-lang/Lexer.cpp
@@ -37,6 +37,12 @@ std::string Lexer::unescape_string(string text)
case 't':
replacement = '\t';
break;
+ case '\"':
+ replacement = '\"';
+ break;
+ case 39:
+ replacement = '\'';
+ break;
case '[':
replacement = 27;
break;
@@ -103,7 +109,14 @@ pair<string, Token> Lexer::parse_token(string line)
for(i=0; i< line.size(); i++)
- {
+ {
+ if(line[i] == '#')
+ {
+ i++;
+ while(line[i] != '\n' && i < line.size()) i++;
+ break;
+ }
+
if(token_value == "" && isspace(line[i])) continue;
if(isdigit(line[i]) || line[i] == '-')