Skip to content

Create a function to automatically compute the value member for an expr node #294

@certik

Description

@certik

Let's start with make_ImplicitCast_t. Let's create a new function make_ImplicitCast_t_value, that will not accept a value argument, but rather compute it automatically based on the other arguments, and return an ImplicitCast node.

We should probably do this for all expr "make" functions and put this code into libasr, that way it can be shared with LFortran.

I think that will clean up both LFortran and LPython quite a bit, as you wouldn't need to worry about value anymore. LFortran already has all kinds of code to fill in the value attribute, and LPython has replicated quite a bit of this. I think this can be extracted into libasr using the above design, thus simplifying both codes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions