Skip to main content

Feature Kinds

Morph packages can own more than syntax.


Common Feature Kinds

KindWhat It Owns
Syntaxparser-facing feature forms
Semanticmeaning, validation, type rules
Loweringtranslation into lower IR or route-specific forms
Runtimepackage-owned runtime families and symbols
Backendbackend routes and emission behavior
ToolingCLI commands and tooling actions
Executionexecution formats and engines
Buildbuild pipelines and target providers

Syntax Features

Syntax features are package-owned grammar hooks.

Examples:

  • a package-owned test block
  • a package-owned operator form
  • a package-owned expression feature

If the framework cannot express a syntax shape yet, widen the parser hook model. Do not hardcode the feature in core as the owner.


Semantic And Lowering Features

These usually travel together:

  • semantic logic decides whether the feature is valid
  • lowering logic decides how it maps into later stages

If a package owns a feature, it should also own the semantic and lowering behavior for that feature.


Runtime And Backend Features

Runtime and backend ownership often matter just as much as syntax:

  • runtime features provide package-owned runtime behavior
  • backend features provide route-specific lowering or emission

Do not move these into generic runtime or codegen files just because they are lower-level.


Tooling, Execution, And Build

Morph is not limited to language syntax.

Packages can also own:

  • commands
  • execution formats
  • build providers

That is why Vcon, Build, and platform packages belong in Morph.


Choosing The Right Kind

Ask:

  • is this user-facing syntax?
  • is it meaning or validation?
  • is it IR translation?
  • is it runtime behavior?
  • is it backend routing?
  • is it tooling or build behavior?

A single user-facing feature may touch several kinds, but they should stay under the same package owner.


Next Steps