Skip to content

Serialize AST#2123

Merged
fubuloubu merged 2 commits into
vyperlang:masterfrom
iamdefinitelyahuman:fix-serialize-ast
Jul 31, 2020
Merged

Serialize AST#2123
fubuloubu merged 2 commits into
vyperlang:masterfrom
iamdefinitelyahuman:fix-serialize-ast

Conversation

@iamdefinitelyahuman

@iamdefinitelyahuman iamdefinitelyahuman commented Jul 29, 2020

Copy link
Copy Markdown
Contributor

What I did

Ensure AST nodes as dicts are serializable. Fixes #2121

How I did it

  • Add unique to_dict and __init__ logic on the Decimal and Bytes nodes.
  • Expand the test case around this behavior to also include creating and loading a JSON string based on the AST-dict.

How to verify it

Run tests.

Cute Animal Picture

image

Comment thread vyper/ast/nodes.py
Comment thread tests/parser/ast_utils/test_ast_dict.py Outdated
@fubuloubu fubuloubu merged commit 444666a into vyperlang:master Jul 31, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the fix-serialize-ast branch October 9, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vyper can't serialize ast for programs that contain decimal literals

2 participants