mirror of
https://github.com/golang/go.git
synced 2025-05-28 19:02:22 +00:00
cmd/compile: remove old lexer and parser
Change-Id: I7306d28930dc4538a3bee31ff5d22f3f40681ec5 Reviewed-on: https://go-review.googlesource.com/32020 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
575b1dda4e
commit
57df2f802f
@ -487,23 +487,6 @@ func colasdefn(left []*Node, defn *Node) {
|
||||
}
|
||||
}
|
||||
|
||||
func colas(left, right []*Node, lno int32) *Node {
|
||||
n := nod(OAS, nil, nil) // assume common case
|
||||
n.Colas = true
|
||||
n.Lineno = lno // set before calling colasdefn for correct error line
|
||||
colasdefn(left, n) // modifies left, call before using left[0] in common case
|
||||
if len(left) == 1 && len(right) == 1 {
|
||||
// common case
|
||||
n.Left = left[0]
|
||||
n.Right = right[0]
|
||||
} else {
|
||||
n.Op = OAS2
|
||||
n.List.Set(left)
|
||||
n.Rlist.Set(right)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// declare the arguments in an
|
||||
// interface field declaration.
|
||||
func ifacedcl(n *Node) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -27,8 +27,6 @@ var imported_unsafe bool
|
||||
|
||||
var (
|
||||
buildid string
|
||||
|
||||
flag_newparser bool
|
||||
)
|
||||
|
||||
var (
|
||||
@ -181,7 +179,6 @@ func Main() {
|
||||
obj.Flagcount("live", "debug liveness analysis", &debuglive)
|
||||
obj.Flagcount("m", "print optimization decisions", &Debug['m'])
|
||||
flag.BoolVar(&flag_msan, "msan", false, "build code compatible with C/C++ memory sanitizer")
|
||||
flag.BoolVar(&flag_newparser, "newparser", true, "use new parser")
|
||||
flag.BoolVar(&nolocalimports, "nolocalimports", false, "reject local (relative) imports")
|
||||
flag.StringVar(&outfile, "o", "", "write output to `file`")
|
||||
flag.StringVar(&myimportpath, "p", "", "set expected package import `path`")
|
||||
@ -320,11 +317,7 @@ func Main() {
|
||||
block = 1
|
||||
iota_ = -1000000
|
||||
imported_unsafe = false
|
||||
if flag_newparser {
|
||||
parseFile(infile)
|
||||
} else {
|
||||
oldParseFile(infile)
|
||||
}
|
||||
parseFile(infile)
|
||||
if nsyntaxerrors != 0 {
|
||||
errorexit()
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user