Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 937 Bytes

parse.md

File metadata and controls

41 lines (27 loc) · 937 Bytes

parse

template<typename Handler>
void parse(Context& ctx, Handler& handler);

template<typename Handler>
void parse(Context& ctx, Handler& handler, ErrorCode& ec);

Required header: <Eclog/Parse.h>

The parse function parses an Eclog text from the input source and reports parsing events to a user-defined handler.

Parameters

Context& ctx The parsing context.

Handler& handler The handler that receives the parsing events.

ErrorCode& ec Set to indicate what error occurred, if any.

Requirements

Handler must be a class type, and given

  • handler, a value of type Handler
  • key, a value of type Key
  • value, a value of type Value

the following expressions must be valid:

handler.onObjectBegin()
handler.onObjectEnd()
handler.onArrayBegin()
handler.onArrayEnd()
handler.onKey(key)
handler.onValue(value)