git-subtree-dir: golang-lean git-subtree-mainline:6487c7046fgit-subtree-split:f5f1701922
16 lines
469 B
Text
16 lines
469 B
Text
import GolangLean.Scanner
|
|
import GolangLean.AST
|
|
|
|
namespace GolangLean
|
|
|
|
/-! # Parser — port of `go/parser/parser.go`.
|
|
|
|
Stub. Recursive-descent over the token stream. We mirror upstream: each
|
|
non-terminal in the Go spec corresponds to one `parseX` function, named
|
|
identically. -/
|
|
|
|
partial def parseFile (src : String) : Except GoError GoFile := do
|
|
let _toks ← scan src
|
|
.error (.notImpl "Parser.parseFile: see go-upstream/src/go/parser/parser.go")
|
|
|
|
end GolangLean
|