void Parser::parse_source(const string &name)
{
- while(1)
- {
- string::size_type slashes = source.find("//////");
- if(slashes==string::npos)
- break;
-
- string::size_type newline = source.find('\n', slashes);
- string pragma = format("#pragma MSP stage(%s)", source.substr(slashes+6, newline-slashes-6));
- source.replace(slashes, newline-slashes, pragma);
- }
-
delete module;
module = new Module;
cur_stage = &module->shared;