Skip to content

Commit

Permalink
bug fix: whitespace in strings would terminate string
Browse files Browse the repository at this point in the history
  • Loading branch information
Nafees10 committed Feb 2, 2021
1 parent 67fc913 commit c41fa77
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/qscript/compiler/tokengen.d
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ private TokenList separateTokens(string[] script){
return true;
}
}
if (token.length && ['"', '\''].hasElement(token[0])){
token = token ~ c;
if (c == token[0] && token[$-1] != '\\'){
lastToken = token.dup;
return true;
}
return false;
}
if (WHITESPACE.hasElement(c)){
if (token.length > 0){
lastToken = token.dup;
Expand Down

0 comments on commit c41fa77

Please sign in to comment.