Changeset 692db791 for libcfa/src/parseconfig.cfa
- Timestamp:
- Aug 31, 2021, 11:44:15 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- 32913bc
- Parents:
- a75cd3d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.cfa
ra75cd3d r692db791 17 17 18 18 void msg( Missing_Config_Entries * ex ) { 19 serr | "The config file is missing " | ex->num_missing | " entries ";19 serr | "The config file is missing " | ex->num_missing | " entries."; 20 20 } 21 21 … … 66 66 67 67 68 // TODO: Replace KVPairs with vector2 when it's fully functional 68 69 struct KVPairs { 69 70 size_t size, max_size; … … 114 115 // Parse configuration from a file formatted in shell style 115 116 KVPairs * parse_tabular_config_format( const char * config_file, size_t num_entries ) { 117 // TODO: Change this to a unique_ptr when we fully support returning them (move semantics) 116 118 * KVPairs kv_pairs = new( num_entries ); 117 119 … … 145 147 // Parse configuration values from intermediate format 146 148 void parse_config( const char * config_file, config_entry entries[], size_t num_entries, config_format format ) { 147 KVPairs *kv_pairs = 0p;149 * KVPairs kv_pairs = 0p; 148 150 choose ( format ) { 149 151 case TABULAR_CONFIG: … … 179 181 } 180 182 } 183 // TODO: Once we get vector2+hash_table, we can more easily add the missing config keys to this error 181 184 if ( entries_so_far < num_entries ) { 182 185 delete( kv_pairs );
Note: See TracChangeset
for help on using the changeset viewer.