Skip to content

[Exporter] Fix parameter direction and type emission in exportArgument#334

Open
p2peek wants to merge 1 commit intop4lang:mainfrom
p2peek:clean-fix-parameter
Open

[Exporter] Fix parameter direction and type emission in exportArgument#334
p2peek wants to merge 1 commit intop4lang:mainfrom
p2peek:clean-fix-parameter

Conversation

@p2peek
Copy link
Copy Markdown

@p2peek p2peek commented Mar 30, 2026

This PR fixes parameter emission in the P4HIR → P4 exporter.

Currently, exportArgument(...) only emits annotations and misses:

  • parameter direction (in/out/inout)
  • parameter type
  • parameter name

This change ensures that parameters are printed as valid P4 syntax, e.g.:

in bit<32> arg0

This is a minimal fix toward completing the exporter described in PR #168.

Next steps include:

  • extracting actual parameter direction from attributes
  • handling parameter names properly
  • improving type coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant