Skip to content

Variant section in a record is not recorded #230

Open

Description

@JBontes

The following code:

type
  a = record
   b : integer;
   case isEnabled : boolean of
    true : (c: Integer);
    false : (d: word);
  end;

Work in progress
This is quite a complicated fix.

There are two options:
A: reuse the case statement elements from the normal case statement.
This is a bit awkward if you want to process the data, because the syntax and semantics of both
case statements are quite different. I would not favor this option.

B: create new building blocks, whilst still following the logic of the normal case statement as much
as is appropriate.
This will create quite a few new TSyntaxNodeTypes, but is the cleanest and simplest option.
It will not break any existing code, because currently the variant record just plain does not work.

The fix, see: 9226c1f

Activity

  1. added a commit that references this issue on Oct 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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