| 520 | } |
| 521 | |
| 522 | sptr<Atom> TeXParser::processCommands(const wstring& command) throw(ex_parse) { |
| 523 | MacroInfo* mac = MacroInfo::_commands[command]; |
| 524 | int opts = mac->_posOpts; |
| 525 | |
| 526 | vector<wstring> args; |
| 527 | getOptsArgs(mac->_nbArgs, opts, args); |
| 528 | args[0] = command; |
| 529 | |
| 530 | if (NewCommandMacro::isMacro(command)) { |
| 531 | auto ret = mac->invoke(*this, args); |
| 532 | insert(_spos, _pos, args.back()); |
| 533 | return ret; |
| 534 | } |
| 535 | |
| 536 | return mac->invoke(*this, args); |
| 537 | } |
| 538 | |
| 539 | sptr<Atom> TeXParser::getScripts(wchar_t f) throw(ex_parse) { |
| 540 | _pos++; |