vnmakarov / mir

A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
MIT License
2.24k stars 145 forks source link

Allow log function callback instead of log file for c2mir messages #405

Open rooStew opened 4 weeks ago

rooStew commented 4 weeks ago

Allow easier embedding into applications, especially an IDE, by setting a log function in c2mir_options rather than needing to create, write, read, and parse a log file

In c2mir, n_errors was only incremented if message_file was assigned a file stream, potentially leading to different behavior for debug and release

isprint was asserting when token_code > 255 in get_token_name