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
3d2c4df9
Commit
3d2c4df9
authored
Dec 18, 2013
by
ChaiShushan
Committed by
Russ Cox
Dec 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/yacc: gofmt y.go
R=golang-dev, adg, rsc CC=golang-dev
https://golang.org/cl/36950043
parent
ff6b9223
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
src/cmd/yacc/yacc.go
src/cmd/yacc/yacc.go
+15
-0
No files found.
src/cmd/yacc/yacc.go
View file @
3d2c4df9
...
...
@@ -49,6 +49,8 @@ import (
"bytes"
"flag"
"fmt"
"go/format"
"io/ioutil"
"os"
"strings"
"unicode"
...
...
@@ -3212,6 +3214,7 @@ func exit(status int) {
if
ftable
!=
nil
{
ftable
.
Flush
()
ftable
=
nil
gofmt
()
}
if
foutput
!=
nil
{
foutput
.
Flush
()
...
...
@@ -3224,6 +3227,18 @@ func exit(status int) {
os
.
Exit
(
status
)
}
func
gofmt
()
{
src
,
err
:=
ioutil
.
ReadFile
(
oflag
)
if
err
!=
nil
{
return
}
src
,
err
=
format
.
Source
(
src
)
if
err
!=
nil
{
return
}
ioutil
.
WriteFile
(
oflag
,
src
,
0666
)
}
var
yaccpar
string
// will be processed version of yaccpartext: s/$$/prefix/g
var
yaccpartext
=
`
/* parser for yacc output */
...
...
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