BlockEntry
| 151 | |
| 152 | // BlockEntry |
| 153 | void Scanner::ScanBlockEntry() { |
| 154 | // we better be in the block context! |
| 155 | if (InFlowContext()) |
| 156 | throw ParserException(INPUT.mark(), ErrorMsg::BLOCK_ENTRY); |
| 157 | |
| 158 | // can we put it here? |
| 159 | if (!m_simpleKeyAllowed) |
| 160 | throw ParserException(INPUT.mark(), ErrorMsg::BLOCK_ENTRY); |
| 161 | |
| 162 | PushIndentTo(INPUT.column(), IndentMarker::SEQ); |
| 163 | m_simpleKeyAllowed = true; |
| 164 | m_canBeJSONFlow = false; |
| 165 | |
| 166 | // eat |
| 167 | Mark mark = INPUT.mark(); |
| 168 | INPUT.eat(1); |
| 169 | m_tokens.push(Token(Token::BLOCK_ENTRY, mark)); |
| 170 | } |
| 171 | |
| 172 | // Key |
| 173 | void Scanner::ScanKey() { |