Skip to content

Commit

Permalink
Revert "Make strings load in new style"
Browse files Browse the repository at this point in the history
This reverts commit 886c1cd.
  • Loading branch information
hostilefork committed Mar 1, 2024
1 parent 2236c8d commit db0c914
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
14 changes: 0 additions & 14 deletions src/core/l-scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,6 @@ static Token Maybe_Locate_Token_May_Push_Mold(
){
bool seen_angles = false;

if (*cp == '<' and cp[1] == '{')
goto scan_newstyle_string;

const Byte* temp = cp;
while (
(*temp == '<' and (seen_angles = true))
Expand Down Expand Up @@ -1404,17 +1401,6 @@ static Token Maybe_Locate_Token_May_Push_Mold(
return TOKEN_0;

case LEX_SPECIAL_LESSER:
if (cp[1] == '{') { // <{ }> is a TEXT! representation
scan_newstyle_string:
cp = Scan_Quote_Push_Mold(mo, cp + 1, ss);
if (not cp or cp[0] != '>') {
*error = Error_Syntax(ss, TOKEN_STRING);
return TOKEN_0;
}
ss->end = cp + 1;
return TOKEN_STRING;
}

cp = Skip_Tag(cp);
if (
not cp // couldn't find ending `>`
Expand Down
6 changes: 3 additions & 3 deletions src/core/t-string.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,11 +738,11 @@ void Mold_Text_Series_At(REB_MOLD *mo, const String* s, REBLEN index) {
return;
}

// It is a braced string, emit it as <{string}>:
// It is a braced string, emit it as {string}:
if (malign == 0)
brace_in = brace_out = 0;

Append_Ascii(buf, "<{");
Append_Codepoint(buf, '{');

REBLEN n;
for (n = index; n < String_Len(s); n++) {
Expand All @@ -767,7 +767,7 @@ void Mold_Text_Series_At(REB_MOLD *mo, const String* s, REBLEN index) {
}
}

Append_Ascii(buf, "}>");
Append_Codepoint(buf, '}');

USED(escape);
USED(paren);
Expand Down

0 comments on commit db0c914

Please sign in to comment.