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:
gingerBill
2024-06-20 11:45:52 +01:00
committed by GitHub
6 changed files with 202 additions and 2 deletions
+14
View File
@@ -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;