From 975705f1fc68af73b25ff135733c57d8cfd62912 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 23 Aug 2016 11:11:01 +0100 Subject: Infix and Postfix procedure calls --- src/string.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/string.cpp') diff --git a/src/string.cpp b/src/string.cpp index 1581feab9..8b5e3aa4b 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -82,7 +82,7 @@ b32 string_contains_char(String s, u8 c) { b32 unquote_char(String s, u8 quote, Rune *rune, b32 *multiple_bytes, String *tail_string) { if (s.text[0] == quote && - (quote == '\'' || quote == '"')) { + (quote == '$' || quote == '"')) { return false; } else if (s.text[0] >= 0x80) { Rune r = -1; @@ -116,7 +116,7 @@ b32 unquote_char(String s, u8 quote, Rune *rune, b32 *multiple_bytes, String *ta case '\\': *rune = '\\'; break; - case '\'': + case '$': case '"': if (c != quote) { return false; @@ -210,7 +210,7 @@ i32 unquote_string(gbAllocator a, String *s_) { *s_ = s; return 1; } - if (quote != '"' && quote != '\'') + if (quote != '"' && quote != '$') return 0; if (string_contains_char(s, '\n')) @@ -220,7 +220,7 @@ i32 unquote_string(gbAllocator a, String *s_) { if (quote == '"') { *s_ = s; return 1; - } else if (quote == '\'') { + } else if (quote == '$') { Rune r = GB_RUNE_INVALID; isize size = gb_utf8_decode(s.text, s.len, &r); if ((size == s.len) && (r != -1 || size != 1)) { @@ -254,7 +254,7 @@ i32 unquote_string(gbAllocator a, String *s_) { offset += size; } - if (quote == '\'' && s.len != 0) { + if (quote == '$' && s.len != 0) { gb_free(a, buf); return 0; } -- cgit v1.2.3