Added a check for unused imports

This commit is contained in:
2024-07-31 11:55:21 +02:00
parent 2293603923
commit 87ae78c86a
14 changed files with 138 additions and 31 deletions

View File

@ -4,7 +4,9 @@ import "git.akyoto.dev/cli/q/src/build/token"
// File represents a single source file.
type File struct {
Path string
Bytes []byte
Tokens token.List
Path string
Package string
Bytes []byte
Imports map[string]*Import
Tokens token.List
}

11
src/build/fs/Import.go Normal file
View File

@ -0,0 +1,11 @@
package fs
import "git.akyoto.dev/cli/q/src/build/token"
// Import represents an import statement in a file.
type Import struct {
Path string
FullPath string
Position token.Position
Used bool
}