Skip to content

Commit e207b55

Browse files
rcgoodfellowmkeeter
authored andcommitted
emit htq entry/parser_entry
1 parent 17274c1 commit e207b55

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

codegen/htq/src/lib.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,27 @@ pub fn emit(
6161

6262
let mut f = std::fs::File::create(filename)?;
6363

64+
writeln!(
65+
f,
66+
"parser_entry {}_start;",
67+
ast.package_instance
68+
.as_ref()
69+
.unwrap()
70+
.parameters
71+
.first()
72+
.expect("package instance has parser entry point")
73+
)?;
74+
writeln!(
75+
f,
76+
"entry {}_apply;",
77+
ast.package_instance
78+
.as_ref()
79+
.unwrap()
80+
.parameters
81+
.get(1)
82+
.expect("package instance has entry point")
83+
)?;
84+
6485
for h in &headers {
6586
writeln!(f, "{}", h.emit())?;
6687
}

0 commit comments

Comments
 (0)