| 689 | } |
| 690 | |
| 691 | void TeXParser::preprocess(wstring& cmd, vector<wstring>& args, int& pos) throw(ex_parse) { |
| 692 | if (cmd == L"newcommand" || cmd == L"renewcommand") { |
| 693 | preprocessNewCmd(cmd, args, pos); |
| 694 | } else if (cmd == L"newenvironment" || cmd == L"renewenvironment") { |
| 695 | preprocessNewCmd(cmd, args, pos); |
| 696 | } else if (NewCommandMacro::isMacro(cmd)) { |
| 697 | inflateNewCmd(cmd, args, pos); |
| 698 | } else if (cmd == L"begin") { |
| 699 | inflateEnv(cmd, args, pos); |
| 700 | } else if (cmd == L"makeatletter") { |
| 701 | _atIsLetter++; |
| 702 | } else if (cmd == L"makeatother") { |
| 703 | _atIsLetter--; |
| 704 | } else if (_unparsedContents.find(cmd) != _unparsedContents.end()) { |
| 705 | getOptsArgs(1, 0, args); |
| 706 | } |
| 707 | } |
| 708 | |
| 709 | void TeXParser::preprocessNewCmd(wstring& cmd, vector<wstring>& args, int& pos) throw(ex_parse) { |
| 710 | MacroInfo* const mac = MacroInfo::_commands[cmd]; |
nothing calls this directly
no outgoing calls
no test coverage detected