mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
all: add support for Windows
This commit is contained in:
committed by
Ron Evans
parent
8906192690
commit
7369a0e7f2
+3
-3
@@ -317,9 +317,9 @@ func (p *Program) parseFile(path string, mode parser.Mode) (*ast.File, error) {
|
||||
defer rd.Close()
|
||||
relpath := path
|
||||
if filepath.IsAbs(path) {
|
||||
relpath, err = filepath.Rel(p.Dir, path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
rp, err := filepath.Rel(p.Dir, path)
|
||||
if err == nil {
|
||||
relpath = rp
|
||||
}
|
||||
}
|
||||
return parser.ParseFile(p.fset, relpath, rd, mode)
|
||||
|
||||
Reference in New Issue
Block a user