Ulya Trofimovich <skvad...@gmail.com> writes: >> I've run into a problem. >> >> In most places where options are already passed, they are passed as >> 'const opt_t *opts'. However, that type does not contain 'source_file'; >> 'source_file' is only in the higher level Opt type. >> >> So either I need to add an Opt arg to all the places that already get >> opt_t (that seems awkward), or move source_file into conopt_t. >> >> Any advice? > > The right way would be to move 'source_file' into 'mutopt_t': the name > of the source file might be changed by one of the '#line' directives > (which are handled by re2c).
Hmm. Opt.source_file is only set in parse_opts. As far as I can tell, the #line directives are inserted into the output file by re2c; they are not in the input .re file. >> I'm tempted to give up; I won't be editing that many .re files, so the >> error message format is not too annoying. > > Sure, you can file an issue on github -- then I'll fix it myself. I'll do that; you are in a better position to decide how to proceed. -- -- Stephe ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Re2c-general mailing list Re2c-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/re2c-general