Skip to content

overload functions don't fully apply #14

@declann

Description

@declann

Hi,

The overload functions don't seem to be apply in all cases, e.g. if operators are used in an if condition, as in

if (a == b) { // ...

To fix this instance I added the following:

    case 'IfStatement':
        visit(statement.test, index, program);
        if (statement.consequent) visit(statement.consequent, index, program);
        if (statement.alternate) visit(statement.alternate, index, program);
        break;

to the switch under visit.

I have a similar problem with For loop code, the ternary statement. My quick attempts to fix didn't work here.

Is there an alternative way to ensure all possible Javascript operators are overloaded?

Thanks
Declan

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