Add -show-unused (Shows unused package declarations of all imported packages)

Crude output at the moment but better than nothing
This commit is contained in:
gingerBill
2020-11-17 12:10:25 +00:00
parent ca4b0527e8
commit 6f71d1f2a9
7 changed files with 208 additions and 33 deletions
+7 -6
View File
@@ -160,12 +160,13 @@ struct ProcInfo {
enum ScopeFlag : i32 {
ScopeFlag_Pkg = 1<<1,
ScopeFlag_Global = 1<<2,
ScopeFlag_File = 1<<3,
ScopeFlag_Init = 1<<4,
ScopeFlag_Proc = 1<<5,
ScopeFlag_Type = 1<<6,
ScopeFlag_Pkg = 1<<1,
ScopeFlag_Builtin = 1<<2,
ScopeFlag_Global = 1<<3,
ScopeFlag_File = 1<<4,
ScopeFlag_Init = 1<<5,
ScopeFlag_Proc = 1<<6,
ScopeFlag_Type = 1<<7,
ScopeFlag_HasBeenImported = 1<<10, // This is only applicable to file scopes