MCPcopy Create free account
hub / github.com/charto/cxml / setCodeBuffer

Method setCodeBuffer

lib/Parser.h:115–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113 ErrorType parse(nbind::Buffer chunk);
114
115 void setCodeBuffer(nbind::Buffer tokenBuffer, nbind::cbFunction &flushTokens) {
116 this->flushTokens = std::unique_ptr<nbind::cbFunction>(new nbind::cbFunction(flushTokens));
117 this->tokenBuffer = tokenBuffer;
118
119 tokenList = reinterpret_cast<uint32_t *>(tokenBuffer.data());
120 tokenBufferEnd = tokenList + tokenBuffer.length() / 4;
121
122 flushTokens.reset();
123 }
124
125 inline void flush(uint32_t *&tokenPtr) {
126 (*flushTokens)();

Callers 1

constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected