Commit 57df2f80 authored by Matthew Dempsky's avatar Matthew Dempsky

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: 's avatarRobert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 575b1dda
......@@ -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) {
......
This diff is collapsed.
......@@ -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()
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment