Tidy ATNDeserializer.

Remove lots of unnecessary type annotations, replace unnecessarily
complicated static initializers, and use "if let" and "guard let" to remove
lots of casting.

Bring together a couple of hundred lines of copy-paste code between
the deserialize and deserializeFromJson paths.

Fix some obvious bugs in the deserialize path.  This code is entirely unused;
we use deserializeFromJson in the autogenerated parsers.  I'm inclined to
remove deserialize since it was so broken, but I'm leaving it for now, in
case someone needs compatibility with ATNs from different language targets
and wants to fix it.
This commit is contained in:
Ewan Mellor 2017-10-26 11:44:10 -07:00
parent 676e6f4810
commit fd58a8c4fd
No known key found for this signature in database
GPG Key ID: 7CE1C6BC9EC8645D
1 changed files with 345 additions and 575 deletions

File diff suppressed because it is too large Load Diff