Skip to content

equ directive should support operator precedence in its arithmetic expressions  #83

@bxparks

Description

@bxparks

Problem

The equ directive can contain arithmetic expressions. But apparently, there is no support for operator precedence. So the following equ statement:

helloRowCol equ helloRow + $100*helloCol

is currently interpreted as (helloRow+$100) * helloCol.

The correct expression has to be written as:

helloRowCol equ helloRow + ($100*helloCol)

as done in #82, but this is very easy to forget.

Expectation

  • The equ directive should support basic operator precedence, so that multiplication * and division / has a higher precedence than addition + and subtraction -`.
  • If there are other operators supported by the equ, a reasonable order of precedence would be to follow the same rules as the C language.

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