Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
2e9b67af
Commit
2e9b67af
authored
May 24, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: bug277 - new conversion syntax
R=ken2 CC=golang-dev
https://golang.org/cl/1220046
parent
43c0a46a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
21 deletions
+10
-21
src/cmd/gc/go.y
src/cmd/gc/go.y
+10
-21
test/fixedbugs/bug277.go
test/fixedbugs/bug277.go
+0
-0
No files found.
src/cmd/gc/go.y
View file @
2e9b67af
...
...
@@ -70,7 +70,7 @@
%type <list> interfacedcl_list vardcl vardcl_list structdcl structdcl_list
%type <list> common_dcl constdcl constdcl1 constdcl_list typedcl_list
%type <node> convtype dotdotdot
%type <node> convtype
comptype
dotdotdot
%type <node> indcl interfacetype structtype ptrtype
%type <node> recvchantype non_recvchantype othertype fnret_type fntype
...
...
@@ -822,7 +822,7 @@ pexpr:
$$
=
nod
(
OCALL
,
$
1
,
N
);
$$->
list
=
list1
($
3
);
}
|
co
nv
type
lbrace
braced_keyval_list
'}'
|
co
mp
type
lbrace
braced_keyval_list
'}'
{
//
composite
expression
$$
=
nod
(
OCOMPLIT
,
N
,
$
1
);
...
...
@@ -886,7 +886,7 @@ sym:
LNAME
name:
sym
sym
%prec NotParen
{
$$ = oldname($1);
if($$->pack != N)
...
...
@@ -896,24 +896,6 @@ name:
labelname:
new_name
convtype:
'
[
' oexpr '
]
' ntype
{
// array literal
$$ = nod(OTARRAY, $2, $4);
}
| '
[
' LDDD '
]
' ntype
{
// array literal of nelem
$$ = nod(OTARRAY, nod(ODDD, N, N), $4);
}
| LMAP '
[
' ntype '
]
' ntype
{
// map literal
$$ = nod(OTMAP, $3, $5);
}
| structtype
/*
* to avoid parsing conflicts, type is split into
* channel types
...
...
@@ -963,6 +945,13 @@ non_recvchantype:
$$ = $2;
}
convtype:
fntype
| othertype
comptype:
othertype
fnret_type:
recvchantype
| fntype
...
...
test/bugs/bug277.go
→
test/
fixed
bugs/bug277.go
View file @
2e9b67af
File moved
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