mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 20:58:15 +00:00
Merge pull request #3137 from laytan/show-defineable
Add flags to show/export defineable values and warn if a -define is unused in the project
This commit is contained in:
@@ -382,6 +382,17 @@ struct GenTypesData {
|
||||
RecursiveMutex mutex;
|
||||
};
|
||||
|
||||
struct Defineable {
|
||||
String name;
|
||||
ExactValue default_value;
|
||||
TokenPos pos;
|
||||
CommentGroup *docs;
|
||||
|
||||
// These strings are only computed from previous fields when defineables are being shown or exported.
|
||||
String default_value_str;
|
||||
String pos_str;
|
||||
};
|
||||
|
||||
// CheckerInfo stores all the symbol information for a type-checked program
|
||||
struct CheckerInfo {
|
||||
Checker *checker;
|
||||
@@ -408,6 +419,9 @@ struct CheckerInfo {
|
||||
Array<Entity *> entities;
|
||||
Array<Entity *> required_foreign_imports_through_force;
|
||||
|
||||
BlockingMutex defineables_mutex;
|
||||
Array<Defineable> defineables;
|
||||
|
||||
|
||||
// Below are accessed within procedures
|
||||
RwMutex global_untyped_mutex;
|
||||
|
||||
Reference in New Issue
Block a user