IniNotify¶
Handler interface for the streaming parser Ini. The parser calls these
methods as it works through the input. Only apply must be implemented;
add_section and errors ship default implementations that accept all
sections and continue past errors.
Public Functions¶
apply¶
Called for every key/value pair. Keys that appear before any section
header are reported with section set to the empty string. Return
false to halt processing.
Parameters¶
Returns¶
- Bool val
add_section¶
Called for every [section] header. The implicit empty-string section
that holds keys appearing before any header does not trigger this
callback; only a literal header line (including []) does. Return
false to halt processing.
Parameters¶
- section: String val
Returns¶
- Bool val
errors¶
Called for each malformed line. line is the 1-based line number where
the error was detected. Return false to halt parsing immediately;
true to keep going. Even when this returns true and parsing
continues, Ini.apply will return false at the end.
Parameters¶
Returns¶
- Bool val