diff options
-rw-r--r-- | cpp/.traces/string_literal | 9 | ||||
-rw-r--r-- | cpp/.traces/string_literal_nested | 2 | ||||
-rw-r--r-- | cpp/.traces/string_literal_with_colons | 2 | ||||
-rw-r--r-- | cpp/013literal_string.cc | 6 |
4 files changed, 13 insertions, 6 deletions
diff --git a/cpp/.traces/string_literal b/cpp/.traces/string_literal index 82986a95..333fb20d 100644 --- a/cpp/.traces/string_literal +++ b/cpp/.traces/string_literal @@ -1,3 +1,10 @@ -parse/0: instruction: 38 +parse/0: instruction: 1 parse/0: ingredient: {name: "abc def", value: 0, type: 0, properties: ["abc def": "literal-string"]} +parse/0: ingredient: {name: "#", value: 0, type: , properties: ["#": ]} +parse/0: ingredient: {name: "copy", value: 0, type: , properties: ["copy": ]} +parse/0: ingredient: {name: "can't", value: 0, type: , properties: ["can't": ]} +parse/0: ingredient: {name: "really", value: 0, type: , properties: ["really": ]} +parse/0: ingredient: {name: "take", value: 0, type: , properties: ["take": ]} +parse/0: ingredient: {name: "a", value: 0, type: , properties: ["a": ]} +parse/0: ingredient: {name: "string", value: 0, type: , properties: ["string": ]} parse/0: product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character"]} diff --git a/cpp/.traces/string_literal_nested b/cpp/.traces/string_literal_nested index 219b31db..937d78f7 100644 --- a/cpp/.traces/string_literal_nested +++ b/cpp/.traces/string_literal_nested @@ -1,3 +1,3 @@ -parse/0: instruction: 38 +parse/0: instruction: 1 parse/0: ingredient: {name: "abc [def]", value: 0, type: 0, properties: ["abc [def]": "literal-string"]} parse/0: product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character"]} diff --git a/cpp/.traces/string_literal_with_colons b/cpp/.traces/string_literal_with_colons index 5f181a42..698f0358 100644 --- a/cpp/.traces/string_literal_with_colons +++ b/cpp/.traces/string_literal_with_colons @@ -1,3 +1,3 @@ -parse/0: instruction: 38 +parse/0: instruction: 1 parse/0: ingredient: {name: "abc:def/ghi", value: 0, type: 0, properties: ["abc:def/ghi": "literal-string"]} parse/0: product: {name: "1", value: 0, type: 2-5-4, properties: ["1": "address":"array":"character"]} diff --git a/cpp/013literal_string.cc b/cpp/013literal_string.cc index be6f771e..b27ede36 100644 --- a/cpp/013literal_string.cc +++ b/cpp/013literal_string.cc @@ -8,13 +8,13 @@ :(scenarios load) :(scenario string_literal) recipe main [ - 1:address:array:character <- new [abc def] + 1:address:array:character <- copy [abc def] # copy can't really take a string ] +parse: ingredient: {name: "abc def", value: 0, type: 0, properties: ["abc def": "literal-string"]} :(scenario string_literal_with_colons) recipe main [ - 1:address:array:character <- new [abc:def/ghi] + 1:address:array:character <- copy [abc:def/ghi] ] +parse: ingredient: {name: "abc:def/ghi", value: 0, type: 0, properties: ["abc:def/ghi": "literal-string"]} @@ -58,6 +58,6 @@ string slurp_quoted(istream& in) { :(scenario string_literal_nested) recipe main [ - 1:address:array:character <- new [abc [def]] + 1:address:array:character <- copy [abc [def]] ] +parse: ingredient: {name: "abc [def]", value: 0, type: 0, properties: ["abc [def]": "literal-string"]} |