Skip to content

Support MSON inheritance #26

@danielgtaylor

Description

@danielgtaylor

Right now this won't behave as expected. Think of the MSON which defines one type which is an object, then another which inherits from it:

  • A (object)
  • B (A)
    • C: test

Without expansion/preprocessing it's likely it will get expanded to something like this:

['object', {name: 'Data types'}, {}, [
  ['object', {name: 'A'}, {}, []],
  ['A', {name: 'B'}, {}, [
    ['string', {name: 'C'}, {}, 'test']
  ]]
]

In the above example we'll get an ElementType for B instead of ObjectType because there is no registered type for A. That means that B.content will be the raw content above instead of proper element instances. The solution may be to create some kind of lookup tree for the base type or some kind of preprocessing loop. Ideas?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions