Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
e2e5c70f
Commit
e2e5c70f
authored
Mar 26, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly parse select case <-c <- v.
From-SVN: r171540
parent
8ac5e12e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
gcc/go/gofrontend/parse.cc
+11
-3
No files found.
gcc/go/gofrontend/parse.cc
View file @
e2e5c70f
...
...
@@ -4375,16 +4375,24 @@ Parse::send_or_recv_stmt(bool* is_send, Expression** channel, Expression** val,
// send or receive expression. If SAW_COMMA is true, then *VAL is
// set and we just read a comma.
if
(
!
saw_comma
&&
this
->
peek_token
()
->
is_op
(
OPERATOR_CHANOP
))
Expression
*
e
;
if
(
saw_comma
||
!
this
->
peek_token
()
->
is_op
(
OPERATOR_CHANOP
))
e
=
this
->
expression
(
PRECEDENCE_NORMAL
,
true
,
true
,
NULL
);
else
{
// case <-c:
*
is_send
=
false
;
this
->
advance_token
();
*
channel
=
this
->
expression
(
PRECEDENCE_NORMAL
,
false
,
true
,
NULL
);
// The next token should be ':'. If it is '<-', then we have
// case <-c <- v:
// which is to say, send on a channel received from a channel.
if
(
!
this
->
peek_token
()
->
is_op
(
OPERATOR_CHANOP
))
return
true
;
}
Expression
*
e
=
this
->
expression
(
PRECEDENCE_NORMAL
,
true
,
true
,
NULL
);
e
=
Expression
::
make_receive
(
*
channel
,
(
*
channel
)
->
location
());
}
if
(
this
->
peek_token
()
->
is_op
(
OPERATOR_EQ
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment