\brief Add Strung function entry to the parser bytecode. \throw nothrow A string function entry consists of the stack position of the return value, followed by a cmSTRFUNC code, the function pointer and an index into the string buffer maintained by the parser. */
| 471 | string buffer maintained by the parser. |
| 472 | */ |
| 473 | void ParserByteCode::AddStrFun(generic_callable_type a_pFun, int a_iArgc, int a_iIdx) |
| 474 | { |
| 475 | m_iStackPos = m_iStackPos - a_iArgc + 1; |
| 476 | |
| 477 | SToken tok; |
| 478 | tok.Cmd = cmFUNC_STR; |
| 479 | tok.Fun.argc = a_iArgc; |
| 480 | tok.Fun.idx = a_iIdx; |
| 481 | tok.Fun.cb = a_pFun; |
| 482 | m_vRPN.push_back(tok); |
| 483 | |
| 484 | m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos); |
| 485 | } |
| 486 | |
| 487 | |
| 488 | /** \brief Add end marker to bytecode. |