Skip to content
Snippets Groups Projects
Commit 64161877 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

include _ in primitive string

parent 07a2ae9e
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ L0: ...@@ -24,7 +24,7 @@ L0:
} else if(character == ' ' || character == '\n' || character == '\t') { } else if(character == ' ' || character == '\n' || character == '\t') {
token.raw += character; token.raw += character;
goto L0; goto L0;
} else if((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z')) { } else if((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z') || character == '_' ) {
token.type = TokenType::STRING; token.type = TokenType::STRING;
token.value += character; token.value += character;
token.raw += character; token.raw += character;
...@@ -45,7 +45,7 @@ L1: ...@@ -45,7 +45,7 @@ L1:
character = in.get(); character = in.get();
if(in.eof()) { if(in.eof()) {
return token; return token;
} else if ( ( character >= 'a' && character <= 'z' ) || ( character >= 'A' && character <= 'Z' ) || ( character >= '0' && character <= '9' ) ) { } else if ( ( character >= 'a' && character <= 'z' ) || ( character >= 'A' && character <= 'Z' ) || character == '_' || ( character >= '0' && character <= '9' ) ) {
token.value += character; token.value += character;
token.raw += character; token.raw += character;
goto L1; goto L1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment