func Parse(fset *token.FileSet, filename string, src []byte, fragmentOk bool) (
	file *ast.File,
	sourceAdj func(src []byte, indent int) []byte,
	indentAdj int,
	err error,
) {
	file, err = parser.ParseFile(fset, filename, src, parserMode)
	if err == nil || !fragmentOk || !strings.Contains(err.Error(), "expected 'package'") {
		return
	}
	psrc := append([]byte("package p;"), src...)
	file, err = parser.ParseFile(fset, filename, psrc, parserMode)
	if err == nil {
		sourceAdj = func(src []byte, indent int) []byte {
			src = src[indent+len("package p\n"):]
			return bytes.TrimSpace(src)
		}
		return
	}
	if !strings.Contains(err.Error(), "expected declaration") {
		return
	}
	fsrc := append(append([]byte("package p; func _() {"), src...), '\n', '\n', '}')
	file, err = parser.ParseFile(fset, filename, fsrc, parserMode)
	if err == nil {
		sourceAdj = func(src []byte, indent int) []byte {
			if indent < 0 {
				indent = 0
			}
			src = src[2*indent+len("package p\n\nfunc _() {"):]
			src = src[:len(src)-len("}\n")]
			return bytes.TrimSpace(src)
		}
		indentAdj = -1
	}
	return
}
Parse parses src, which was read from the named file,
as a Go source file, declaration, or statement list.
package format
import (
	"bytes"
	"github.com/tcard/sgo/sgo/ast"
	"github.com/tcard/sgo/sgo/parser"
	"github.com/tcard/sgo/sgo/printer"
	"github.com/tcard/sgo/sgo/token"
	"strings"
)
const parserMode = parser.ParseComments