Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(221)

Unified Diff: src/cmd/godoc/parser.go

Issue 12206044: code review 12206044: cmd/godoc: delete from core repository (Closed)
Patch Set: diff -r a2e6a2fddcf5 https://code.google.com/p/go Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/godoc/main.go ('k') | src/cmd/godoc/play.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/godoc/parser.go
===================================================================
deleted file mode 100644
--- a/src/cmd/godoc/parser.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains support functions for parsing .go files
-// accessed via godoc's file system fs.
-
-package main
-
-import (
- "go/ast"
- "go/parser"
- "go/token"
- pathpkg "path"
-)
-
-func parseFile(fset *token.FileSet, filename string, mode parser.Mode) (*ast.File, error) {
- src, err := ReadFile(fs, filename)
- if err != nil {
- return nil, err
- }
- return parser.ParseFile(fset, filename, src, mode)
-}
-
-func parseFiles(fset *token.FileSet, abspath string, localnames []string) (map[string]*ast.File, error) {
- files := make(map[string]*ast.File)
- for _, f := range localnames {
- absname := pathpkg.Join(abspath, f)
- file, err := parseFile(fset, absname, parser.ParseComments)
- if err != nil {
- return nil, err
- }
- files[absname] = file
- }
-
- return files, nil
-}
« no previous file with comments | « src/cmd/godoc/main.go ('k') | src/cmd/godoc/play.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b