Skip to content

Modulo Operation (%) seems not to work #7

@pavelicious-dev

Description

@pavelicious-dev

When using simple modulo operations like '4 % 2' I always get undefined as result.
It seems that the modulo operation is missing as case in the big switch expressions in compiler.ts and shunting-yard.ts

switch (node.operation) {
            case '*':
                return left * right;
            case '/':
                return left / right;
            case '%':                                   <-- this one is missing         
                return left % right;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions