documentation: Describe NOTEs

Describe how/why notes are used in the code.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-04-20 05:59:27 -04:00
parent 78a53d388f
commit 5a9ef6ce4d
2 changed files with 17 additions and 2 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ extension Declaration: CompilableDeclaration {
let declaration_compilers: [String: CompilableDeclaration.Type] = [
"function_declaration": FunctionDeclaration.self,
"control_declaration": Control.self,
"type_declaration": StructDeclaration.self, // Assume that type declarations are struct declarations.
"type_declaration": StructDeclaration.self, // ASSUME: Type declarations are struct declarations.
]
guard let declaration_compiler = declaration_compilers[node.nodeType!] else {
@@ -274,7 +274,7 @@ extension P4Lang.Parser: CompilableDeclaration {
let type_node = currentChild
var parser_name: Common.Identifier? = .none
// Assume that the parameter list is empty!
// TODO: Handle parser parameter lists.
var parameter_list = ParameterList()
do {