Changeset 692db791


Ignore:
Timestamp:
Aug 31, 2021, 11:44:15 AM (3 years ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
32913bc
Parents:
a75cd3d
Message:

Made little changes and added comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseconfig.cfa

    ra75cd3d r692db791  
    1717
    1818void 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.";
    2020}
    2121
     
    6666
    6767
     68// TODO: Replace KVPairs with vector2 when it's fully functional
    6869struct KVPairs {
    6970        size_t size, max_size;
     
    114115// Parse configuration from a file formatted in shell style
    115116KVPairs * 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)
    116118        * KVPairs kv_pairs = new( num_entries );
    117119
     
    145147// Parse configuration values from intermediate format
    146148void 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;
    148150        choose ( format ) {
    149151                case TABULAR_CONFIG:
     
    179181                }
    180182        }
     183        // TODO: Once we get vector2+hash_table, we can more easily add the missing config keys to this error
    181184        if ( entries_so_far < num_entries ) {
    182185                delete( kv_pairs );
Note: See TracChangeset for help on using the changeset viewer.