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
ffafad19
Commit
ffafad19
authored
Nov 23, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup for keywords in fieldnames
R=r OCL=19883 CL=19883
parent
e081f25c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
src/cmd/gc/go.y
src/cmd/gc/go.y
+18
-4
No files found.
src/cmd/gc/go.y
View file @
ffafad19
...
...
@@ -56,7 +56,7 @@
%
type
<
node
>
simple_stmt
osimple_stmt
semi_stmt
%
type
<
node
>
expr
uexpr
pexpr
expr_list
oexpr
oexpr_list
expr_list_r
%
type
<
node
>
exprsym3_list_r
exprsym3
%
type
<
node
>
name
onew_name
new_name
new_name_list_r
%
type
<
node
>
name
onew_name
new_name
new_name_list_r
new_field
%
type
<
node
>
vardcl_list_r
vardcl
Avardcl
Bvardcl
%
type
<
node
>
interfacedcl_list_r
interfacedcl
%
type
<
node
>
structdcl_list_r
structdcl
embed
...
...
@@ -958,6 +958,12 @@ new_name:
$$
=
newname
($
1
);
}
new_field
:
sym2
{
$$
=
newname
($
1
);
}
new_type
:
sym1
{
...
...
@@ -980,8 +986,16 @@ sym1:
sym
|
keyword
/*
*
keywords
that
can
be
field
names
*
pretty
much
any
name
can
be
allowed
*
limited
only
by
good
taste
*/
sym2
:
sym1
|
LTYPE
|
LFUNC
|
LVAR
/*
*
keywords
that
can
be
variables
...
...
@@ -1402,12 +1416,12 @@ interfacedcl_list_r:
}
structdcl
:
new_
name
','
structdcl
new_
field
','
structdcl
{
$$
=
nod
(
ODCLFIELD
,
$
1
,
N
);
$$
=
nod
(
OLIST
,
$$,
$
3
);
}
|
new_
name
type
oliteral
|
new_
field
type
oliteral
{
$$
=
nod
(
ODCLFIELD
,
$
1
,
N
);
$$->
type
=
$
2
;
...
...
@@ -2000,7 +2014,7 @@ hidden_importsym:
* to check whether the rest of the grammar is free of
* reduce/reduce conflicts, comment this section out by
* removing the slash on the next line.
*
/
*
lpack:
LATYPE
{
...
...
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