Skip to content

Support if expressions #407

@cirras

Description

@cirras

Prerequisites

  • This improvement has not already been suggested.
  • This improvement would be generally useful, not specific to my code or setup.

Engine area

Delphi language support

Improvement description

Delphi 13 has introduced a new if conditional operator.

We'll need to:

  • parse the new syntax
  • handle type resolution by determining the Least Upper Bound (LUB) type from the 2 result expressions
  • API: introduce IfExpressionNode node type

Example

Result := if Foo then Bar else Baz;

See

Rationale

Delphi 13 support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineImprovements to the core engineenhancementImprovements to an existing feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions