From 2fd8f8bb99a2832b3684878c020ba47322e79332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 30 Jul 2017 12:27:57 +0100 Subject: Replace Unicode quotes in user-facing strings by ASCII MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g" --- src/libexpr/json-to-value.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libexpr/json-to-value.cc') diff --git a/src/libexpr/json-to-value.cc b/src/libexpr/json-to-value.cc index c189cdef3..9380de3a6 100644 --- a/src/libexpr/json-to-value.cc +++ b/src/libexpr/json-to-value.cc @@ -57,7 +57,7 @@ static void parseJSON(EvalState & state, const char * & s, Value & v) values.push_back(v2); skipWhitespace(s); if (*s == ']') break; - if (*s != ',') throw JSONParseError("expected ‘,’ or ‘]’ after JSON array element"); + if (*s != ',') throw JSONParseError("expected ',' or ']' after JSON array element"); s++; } s++; @@ -74,14 +74,14 @@ static void parseJSON(EvalState & state, const char * & s, Value & v) if (attrs.empty() && *s == '}') break; string name = parseJSONString(s); skipWhitespace(s); - if (*s != ':') throw JSONParseError("expected ‘:’ in JSON object"); + if (*s != ':') throw JSONParseError("expected ':' in JSON object"); s++; Value * v2 = state.allocValue(); parseJSON(state, s, *v2); attrs[state.symbols.create(name)] = v2; skipWhitespace(s); if (*s == '}') break; - if (*s != ',') throw JSONParseError("expected ‘,’ or ‘}’ after JSON member"); + if (*s != ',') throw JSONParseError("expected ',' or '}' after JSON member"); s++; } state.mkAttrs(v, attrs.size()); -- cgit v1.2.3