Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
properly unescape strings with new libdparse API
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Jul 22, 2020
1 parent 1cc2f50 commit af44edc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/workspaced/dparseext.d
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ void foo()
string evaluateExpressionString(const PrimaryExpression expr)
in (expr !is null)
{
import dparse.strings : unescapeString;

switch (expr.primary.type)
{
case tok!"stringLiteral":
Expand All @@ -195,7 +197,7 @@ in (expr !is null)
case tok!"stringLiteral":
case tok!"wstringLiteral":
case tok!"dstringLiteral":
ret ~= t.text;
ret ~= unescapeString(t.text);
break;
default:
// unexpected token, return input because it might already be
Expand Down

0 comments on commit af44edc

Please sign in to comment.