MCPcopy Create free account
hub / github.com/bewuethr/stroustrup-ppp / putback

Method putback

code_snippets/Chapter07/chapter.7.7-problematic.cpp:100–105  ·  view source on GitHub ↗

The putback() member function puts its argument back into the Token_stream's buffer:

Source from the content-addressed store, hash-verified

98
99// The putback() member function puts its argument back into the Token_stream's buffer:
100void Token_stream::putback(Token t)
101{
102 if (full) error("putback() into a full buffer");
103 buffer = t; // copy t to buffer
104 full = true; // buffer is now full
105}
106
107//------------------------------------------------------------------------------
108

Callers 4

getMethod · 0.45
termFunction · 0.45
expressionFunction · 0.45
calculateFunction · 0.45

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected