Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(300)

Delta Between Two Patch Sets: src/cmd/gc/go.y

Issue 2350041: code review 2350041: gc: implement new composite literal spec (Closed)
Left Patch Set: Created 13 years, 6 months ago
Right Patch Set: code review 2350041: gc: implement new composite literal spec Created 13 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/cmd/gc/typecheck.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 /* 5 /*
6 * Go language grammar. 6 * Go language grammar.
7 * 7 *
8 * The Go semicolon rules are: 8 * The Go semicolon rules are:
9 * 9 *
10 * 1. all statements and declarations are terminated by semicolons. 10 * 1. all statements and declarations are terminated by semicolons.
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 $$->op = OSWITCH; 666 $$->op = OSWITCH;
667 $$->list = $5; 667 $$->list = $5;
668 typesw = typesw->left; 668 typesw = typesw->left;
669 popdcl(); 669 popdcl();
670 } 670 }
671 671
672 select_stmt: 672 select_stmt:
673 LSELECT 673 LSELECT
674 { 674 {
675 markdcl(); 675 markdcl();
676 typesw = nod(OXXX, typesw, N);
676 } 677 }
677 switch_body 678 switch_body
678 { 679 {
679 $$ = nod(OSELECT, N, N); 680 $$ = nod(OSELECT, N, N);
680 $$->list = $3; 681 $$->list = $3;
682 typesw = typesw->left;
681 popdcl(); 683 popdcl();
682 } 684 }
683 685
684 /* 686 /*
685 * expressions 687 * expressions
686 */ 688 */
687 expr: 689 expr:
688 uexpr 690 uexpr
689 | expr LOROR expr 691 | expr LOROR expr
690 { 692 {
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 static void 1945 static void
1944 fixlbrace(int lbr) 1946 fixlbrace(int lbr)
1945 { 1947 {
1946 // If the opening brace was an LBODY, 1948 // If the opening brace was an LBODY,
1947 // set up for another one now that we're done. 1949 // set up for another one now that we're done.
1948 // See comment in lex.c about loophack. 1950 // See comment in lex.c about loophack.
1949 if(lbr == LBODY) 1951 if(lbr == LBODY)
1950 loophack = 1; 1952 loophack = 1;
1951 } 1953 }
1952 1954
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b