JSON-LD Parser#426
Conversation
nkaralis
left a comment
There was a problem hiding this comment.
Thank you for the PR.
This is a first review focusing mostly on ParserTypes.
nkaralis
left a comment
There was a problem hiding this comment.
Second round of questions and comments.
nkaralis
left a comment
There was a problem hiding this comment.
Some more comments, mostly on ContextParser (parse_context_term is the only one left here).
| // 3 | ||
| if (parse_ctx != nullptr) { | ||
| auto i = parse_ctx->active_context.try_find_term(*value); | ||
| if (i != nullptr && i->parse_state != ParseState::Done && i != ignore_local) { |
There was a problem hiding this comment.
in which case is the parse state done in this case?
There was a problem hiding this comment.
Done => the term was parsed successfully.
This happens if one term in a context refers to another term in the context and the refered to term was parsed first.
I added comments to the enum type to explain what they represent.
| } | ||
| if (parse_ctx != nullptr) { | ||
| auto term = parse_ctx->active_context.try_find_term(pre); | ||
| if (term != nullptr && term->parse_state != ParseState::Done) { |
| } | ||
| for (auto v : a) { | ||
| switch (v.type()) { | ||
| case simdjson::ondemand::json_type::null: // 5.1 |
There was a problem hiding this comment.
duplicate code (same code in the else if clause above). are both needed?
There was a problem hiding this comment.
Both are needed, one is inside an array, the other in place of that array.
0f29853 to
af3fd4e
Compare
close #424