MCPcopy Create free account
hub / github.com/NanoMichael/MicroTeX / inflateNewCmd

Method inflateNewCmd

src/core/parser.cpp:718–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716}
717
718void TeXParser::inflateNewCmd(wstring& cmd, vector<wstring>& args, int& pos) throw(ex_parse) {
719 MacroInfo* const mac = MacroInfo::_commands[cmd];
720 getOptsArgs(mac->_nbArgs, mac->_posOpts, args);
721 args[0] = cmd;
722 try {
723 mac->invoke(*this, args);
724 // The last element is the returned value (after inflated macro)
725 _parseString.replace(pos, _pos - pos, args.back());
726 } catch (ex_parse& e) {
727 if (!_isPartial) throw;
728 pos += cmd.length() + 1;
729 }
730 _len = _parseString.length();
731 _pos = pos;
732}
733
734void TeXParser::inflateEnv(wstring& cmd, vector<wstring>& args, int& pos) throw(ex_parse) {
735 getOptsArgs(1, 0, args);

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected