Skip to content

Add interpreter rule for the "stripunit" expression of physunits language #1597

@kbirken

Description

@kbirken

The current unit language org.iets3.core.expr.typetags.physunits (see documentation) provides a stripunit expression (concept StripUnitExpression), which is useful for stripping the unit from a tagged expression. This is especially needed if converting an expression with a unit to an expression with a unit of unspecified quantity.

However, the StripUnitExpression is currently only supported in the editor and the typesystem. The interpreter bails out if it encounters a node of this concept. A (trivial) interpreter rule should be implemented which ignores the unit tag and just evaluates the contained expression.

Remark: There is a NoConvertExpression which extends the StripUnitExpression. The extended one has an interpreter rule, but overrides the typesystem of the StripUnitExpression. It should be checked if this extends-relationship is really wanted.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions