Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
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