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

Method preprocess

src/core/parser.cpp:691–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691void 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
709void TeXParser::preprocessNewCmd(wstring& cmd, vector<wstring>& args, int& pos) throw(ex_parse) {
710 MacroInfo* const mac = MacroInfo::_commands[cmd];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected