Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: adjusted some macros in kclvm-parser and add some methods in kclvm-ast #20

Merged
merged 1 commit into from
May 20, 2022

Commits on May 19, 2022

  1. refactor: adjusted some macros in kclvm-parser and add some methods i…

    …n kclvm-ast.
    
    Note:
    1. Adjusted the position of some macros in kclvm-parser.
    
    What:
    1. Move some util macros for ast from kclvm-parser to kclvm-ast,
       and add some new util methods in kclvm-ast.
    
    How:
    1. Move macros "node_ref", "expr_as" and "stmt_as" form from
       kclvm-parser/mod.rs to kclvm-ast/lib.rs
    2. Add method "build_assign_node" in kclvm-ast/lib.rs in order to
       construct an AssignStmt
    3. Add method "filter_schema_stmt_from_module" in kclvm-ast/ast.rs
       in order to select all "SchemaStmt" in "Module".
    4. Add method "TryFrom<...>" in kclvm-ast/ast.rs for "StringLit" and
       "NameConstant" in order to convert from rust string and bool to
       kclvm ast.
    
    Why:
    1. Adjust the structure of the kclvm-ast and add some util methods to
       continuously enrich the infrastructure of KCLVM to support the
       development.
    zong-zhe committed May 19, 2022
    Configuration menu
    Copy the full SHA
    2d19a3e View commit details
    Browse the repository at this point in the history