@@ -802,46 +802,6 @@ static Value _rootValue(Parser *p) {
802
802
ret.set_comment_after (existingAfter + ret.get_comment_after ());
803
803
}
804
804
}
805
- // ret = _readObject(p, false);
806
- // if (_hasTrailing(p, &ciExtra)) {
807
- // throw syntax_error(_errAt(p, "Syntax error, found trailing characters"));
808
- // }
809
- // break;
810
- // case '[':
811
- // ret = _readArray(p);
812
- // if (_hasTrailing(p, &ciExtra)) {
813
- // throw syntax_error(_errAt(p, "Syntax error, found trailing characters"));
814
- // }
815
- // break;
816
- // }
817
-
818
- // if (!ret.defined()) {
819
- // // assume we have a root object without braces
820
- // try {
821
- // ret = _readObject(p, true);
822
- // if (_hasTrailing(p, &ciExtra)) {
823
- // // Syntax error, or maybe a single JSON value.
824
- // ret = Value();
825
- // } else if (ret.size() > 0) {
826
- // // if there were no braces, the first comment belongs to the first child
827
- // // of the root object, not to the root object itself.
828
- // _setComment(ret[0], &Value::set_comment_before, p, ciBefore);
829
- // ciBefore = CommentInfo();
830
- // }
831
- // } catch(const syntax_error& e) {
832
- // errMsg = std::string(e.what());
833
- // }
834
- // }
835
-
836
- // if (!ret.defined()) {
837
- // // test if we are dealing with a single JSON value instead (true/false/null/num/"")
838
- // _resetAt(p);
839
- // ret = _readValue(p);
840
- // if (_hasTrailing(p, &ciExtra)) {
841
- // // Syntax error.
842
- // ret = Value();
843
- // }
844
- // }
845
805
846
806
return ret;
847
807
}
0 commit comments