ion-cli
ion-cli copied to clipboard
Add support for writing SExpression in code generation
Issue #105:
Description of changes:
This PR works on adding support for writing SExpression in code generation.
Generates Code:
- Generated code for given ISL test files in Java can be found here
- Generated code for given ISL test files in Rust can be found here
List of changes:
- Adds changes to support sequence types with type constraint
- Modifies
AbstractDataType::Sequenceto store sequence type (sexp or list) and element type - Adds
element_type()andsequence_type()methods onAbstractDataTypeto get element type and sequence type details - Renames
verify_abstract_data_type_consistencytoverify_and_update_abstract_data_type verify_and_update_abstract_data_typemodified to check for special cases whentypeandelementcosntraints occur togetherJavaLanguageandRustLanguageupdatedtarget_typeto return generic type forListandSExp- Adds
wrapper_classinJavaLanguageto be sued withinArrayList
- Modifies
- Adds result template to generate SerdeResult in Rust
- Adds template to generate
SerdeResultin Rust - Changes current tests to use
SerdeResult - Changes generator to render
SerdeReusltin output module
- Adds template to generate
- Adds template file changes for SExp support
- Adds new test files for SExp support
- Adds new fields that uses SExpression in Ion files
- Adds bad Ion files to verify SExpression and List are properly serialized-deserialized
- Adds ISL files with Sexpression field changes
- Adds changes to Java setter tests
Tests
Modifies roundtrip tests for given ISL files and input Ion values to verify SExpression support.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.