From 8eb33f063af1c744e735b42766ed766b446cac71 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 27 Jan 2023 20:54:23 -0700 Subject: parse: Change the StringBeg/StringEnd symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IDK if my eyes are worse, or something changed with my font stack, but I can no longer visually distinguish “ and ” so use " and » instead. Plus » psycologically registers as "kinda special", so it's less confusing to see as an object-thing in a stack. --- internal/parse.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'internal/parse.go') diff --git a/internal/parse.go b/internal/parse.go index 895c930..cefcca0 100644 --- a/internal/parse.go +++ b/internal/parse.go @@ -148,7 +148,7 @@ func (t RuneType) String() string { RuneTypeArrayComma: "a", RuneTypeArrayEnd: "]", - RuneTypeStringBeg: "“", + RuneTypeStringBeg: "\"", RuneTypeStringChar: "c", RuneTypeStringEsc: "\\", RuneTypeStringEsc1: "b", @@ -157,7 +157,7 @@ func (t RuneType) String() string { RuneTypeStringEscUB: "B", RuneTypeStringEscUC: "C", RuneTypeStringEscUD: "D", - RuneTypeStringEnd: "”", + RuneTypeStringEnd: "»", RuneTypeNumberIntNeg: "-", RuneTypeNumberIntZero: "0", @@ -234,7 +234,7 @@ type Parser struct { // // The "normal"stack-relevant RuneTypes are: // - // “\uABC for strings + // "\uABC for strings // -01.2e+3 for numbers // 𝕥𝕣𝕦 for "true" // 𝔣𝔞𝔩𝔰 for "false" @@ -244,7 +244,7 @@ type Parser struct { // rule; they need some special assignments: // // { object: waiting for key to start or '}' - // ” object: reading key / waiting for colon + // » object: reading key / waiting for colon // : object: waiting for value to start // o object: reading value / waiting for ',' or '}' // @@ -263,20 +263,20 @@ type Parser struct { // stack processed // x // { { - // ”“ {" - // ”“ {"x - // ” {"x" + // »" {" + // »" {"x + // » {"x" // : {"x": - // o“ {"x":" - // o“ {"x":"y + // o" {"x":" + // o" {"x":"y // o {"x":"y" // { {"x":"y", - // ”“ {"x":"y"," - // ”“ {"x":"y","a - // ” {"x":"y","a" + // »" {"x":"y"," + // »" {"x":"y","a + // » {"x":"y","a" // : {"x":"y","a": - // o“ {"x":"y","a":" - // o“ {"x":"y","a":"b + // o" {"x":"y","a":" + // o" {"x":"y","a":"b // o {"x":"y","a":"b" // {"x":"y","a":"b"} stack []RuneType -- cgit v1.2.3-54-g00ecf