Commit Graph

9 Commits

Author SHA1 Message Date
Martin Atkins
308eb3a291 Relocate into the "zclconf" github account 2017-05-27 17:33:09 -07:00
Martin Atkins
8654cf0361 Body.MissingItemRange method
When producing diagnostics about missing attributes or bodies it's
necessary to have a range representing the place where the missing thing
might be inserted.

There's not always a single reasonable value for this, so some liberty
can be taken about what exactly is returned as long as it's somewhere
the user can relate back to the construct producing the error.
2017-05-21 11:46:58 -07:00
Martin Atkins
4bbfa6d6ab json: recovery behavior for the parser
When using the parser to do static analysis and editor integrations, it's
still useful to be able to get the incomplete AST resulting from a parse
error.

Callers that intend to use the returned value to take real actions (as
opposed to just analysis) must check diags.HasError() to determine if
the returned file can be considered valid.
2017-05-20 13:32:12 -07:00
Martin Atkins
aa13eab21f json: Don't suppress parser return value on errors
Even if errors were encountered during parsing, it is helpful to still
return a partial AST if possible since that allows for the source code
analysis features to still (partially) work in the face of errors.
2017-05-20 09:30:04 -07:00
Martin Atkins
eca76d650c json: Detect and report extraneous data at EOF 2017-05-17 07:59:41 -07:00
Martin Atkins
0ef4932962 json: parsing of arrays
(and assorted bugfixes in parsing of objects that were found in the
process of adapting that code for arrays.)
2017-05-17 07:55:21 -07:00
Martin Atkins
b073937523 json: Basic parsing of number values 2017-05-17 07:34:33 -07:00
Martin Atkins
4100bdfd2f json: Parsing of strings and objects 2017-05-16 08:00:07 -07:00
Martin Atkins
f6bd122f4b json: parsing of keywords 2017-05-16 06:51:19 -07:00