diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-25 17:17:20 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-25 17:17:20 -0800 |
commit | dcc060c7d4ef56b978beb34ddce8d8ffcec94fa6 (patch) | |
tree | 7cbb9cd1d8544c7c6c65725fa195ca3821b04b07 /html/055parse_tree.cc.html | |
parent | 0f5a2f4e21046e319ce0fadec32cc5e89d2f4620 (diff) | |
download | mu-dcc060c7d4ef56b978beb34ddce8d8ffcec94fa6.tar.gz |
2706 - update html
Diffstat (limited to 'html/055parse_tree.cc.html')
-rw-r--r-- | html/055parse_tree.cc.html | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/html/055parse_tree.cc.html b/html/055parse_tree.cc.html index ec8d3f77..46a199a3 100644 --- a/html/055parse_tree.cc.html +++ b/html/055parse_tree.cc.html @@ -39,10 +39,12 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } recipe main [ <span class="Delimiter">{</span><span class="Constant">1</span>: number<span class="Delimiter">,</span> foo: <span class="Delimiter">(</span>bar <span class="Delimiter">(</span>baz quux<span class="Delimiter">))}</span><span class="Special"> <- </span>copy <span class="Constant">34</span> ] -<span class="traceContains">+parse: product: {"1": "number", "foo": <"bar" : <<"baz" : <"quux" : <>>> : <>>>}</span> +<span class="traceContains">+parse: product: 1: "number", {"foo": ("bar" ("baz" "quux"))}</span> <span class="Delimiter">:(before "End Parsing Reagent Property(value)")</span> value = parse_string_tree<span class="Delimiter">(</span>value<span class="Delimiter">);</span> +<span class="Delimiter">:(before "End Parsing Reagent Type Property(value)")</span> +value = parse_string_tree<span class="Delimiter">(</span>value<span class="Delimiter">);</span> <span class="Delimiter">:(code)</span> string_tree* parse_string_tree<span class="Delimiter">(</span>string_tree* s<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -97,7 +99,7 @@ container foo [ ] container bar [ ] -<span class="traceContains">+parse: product: {"1": <"foo" : <<"address" : <"array" : <"character" : <>>>> : <<"bar" : <"number" : <>>> : <>>>>}</span> +<span class="traceContains">+parse: product: 1: ("foo" ("address" "array" "character") ("bar" "number"))</span> <span class="Comment">//: an exception is 'new', which takes a type tree as its ingredient *value*</span> @@ -105,12 +107,15 @@ container bar [ recipe main [ x:address:shared:address:number<span class="Special"> <- </span>new <span class="Delimiter">{(</span>address number<span class="Delimiter">)</span>: type<span class="Delimiter">}</span> ] -<span class="traceContains">+new: size of <"address" : <"number" : <>>> is 1</span> +<span class="traceContains">+new: size of ("address" "number") is 1</span> <span class="Delimiter">:(before "End Post-processing(expected_product) When Checking 'new'")</span> -expected_product<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>second = parse_string_tree<span class="Delimiter">(</span>expected_product<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>second<span class="Delimiter">);</span> -delete expected_product<span class="Delimiter">.</span>type<span class="Delimiter">;</span> -expected_product<span class="Delimiter">.</span>type = new_type_tree<span class="Delimiter">(</span>expected_product<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>second<span class="Delimiter">);</span> +<span class="Delimiter">{</span> + string_tree* tmp_type_names = parse_string_tree<span class="Delimiter">(</span>expected_product<span class="Delimiter">.</span>type<span class="Delimiter">-></span>name<span class="Delimiter">);</span> + delete expected_product<span class="Delimiter">.</span>type<span class="Delimiter">;</span> + expected_product<span class="Delimiter">.</span>type = new_type_tree<span class="Delimiter">(</span>tmp_type_names<span class="Delimiter">);</span> + delete tmp_type_names<span class="Delimiter">;</span> +<span class="Delimiter">}</span> <span class="Delimiter">:(before "End Post-processing(type_name) When Converting 'new'")</span> type_name = parse_string_tree<span class="Delimiter">(</span>type_name<span class="Delimiter">);</span> </pre> |