MCPcopy Create free account
hub / github.com/apache/trafficserver / ScanValue

Method ScanValue

lib/yamlcpp/src/scantoken.cpp:192–218  ·  view source on GitHub ↗

Value

Source from the content-addressed store, hash-verified

190
191// Value
192void Scanner::ScanValue() {
193 // and check that simple key
194 bool isSimpleKey = VerifySimpleKey();
195 m_canBeJSONFlow = false;
196
197 if (isSimpleKey) {
198 // can't follow a simple key with another simple key (dunno why, though - it
199 // seems fine)
200 m_simpleKeyAllowed = false;
201 } else {
202 // handle values differently in the block context (and manage indents)
203 if (InBlockContext()) {
204 if (!m_simpleKeyAllowed)
205 throw ParserException(INPUT.mark(), ErrorMsg::MAP_VALUE);
206
207 PushIndentTo(INPUT.column(), IndentMarker::MAP);
208 }
209
210 // can only put a simple key here if we're in block context
211 m_simpleKeyAllowed = InBlockContext();
212 }
213
214 // eat
215 Mark mark = INPUT.mark();
216 INPUT.eat(1);
217 m_tokens.push(Token(Token::VALUE, mark));
218}
219
220// AnchorOrAlias
221void Scanner::ScanAnchorOrAlias() {

Callers

nothing calls this directly

Calls 6

ParserExceptionFunction · 0.85
eatMethod · 0.80
TokenClass · 0.70
markMethod · 0.45
columnMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected