Added a check for unused imports
This commit is contained in:
parent
2293603923
commit
87ae78c86a
14 changed files with 138 additions and 31 deletions
|
@ -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
11
src/build/fs/Import.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue