# dynarec **Repository Path**: dong50252409/dynarec ## Basic Information - **Project Name**: dynarec - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-01-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Dynarec ======= Parse transform that automaticaly generates and exports accessors for all records declared within a module. It generates and exports the following functions: ```erlang get_value(field_name, Record) -> Record#record_name.field_name. set_value(field_name, Value, Record) when is_record(Record, record_name) -> Record#record_name{field_name = Value}. records() -> [record_name1, record_name2, ...]. fields(record_name) -> [field_name1, field_name2, ...]. new_record(record_name) -> #record_name{}. ``` It runs at compile time using following preprocessor directive: ```erlang -compile({parse_transform, dynarec}). ``` All those functions are added to the module that uses the directive. Be aware that dynarec.erl must be compiled before any module that uses it.