…leafs & branches (no unittests yet)
Resolved the inconsistencies with CJSONScannerErrorArrayNotTerminated. (Two versions of it were created since the same state had been represented with both a duplicate of another error code and a new unique code.) Also gave CJSONScannerErrorNumberNotScannable its own error code value. Note that the "fundamental" errors (formerly all -1) have also now been broken out into discrete values. Code values have also been adjusted to group them somewhat. Fundamental errors are from -10 to -99. Dictionary errors in the -100s. Array errors in the -200s. Strings in -300s. Numbers in the -400s. Also tweaked a name or two for consistency. It's tempting to remove "Error" from all these codes, but I'll err on the side of verbosity for now.
Moved various hardcoded error codes into enums that are defined near their corresponding error domain constants. The intent is in part to enable library users to more easily grasp the meaning of these codes as they encounter them and to simplify doing something with them. (e.g. displaying custom error messages on a per-error basis.) These codes have been transcribed verbatim from the original source and named based on the existing error messages. The mapping of codes to the actual detection of error states in CJSONScanner had a few possible anomalies that are still reflected here. Resolution of these anomalies (as appropriate) is intended for the next commit.
Added a tidied twitter public timeline file and a minimal test case for Tom Harrington's bug #3.