Skip to content

Commit 34b03af

Browse files
committed
refact(rivet): disallow function declarations with extern
1 parent e20d6bb commit 34b03af

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

lib/rivet/src/parser/decls.ri

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ extend Parser {
189189
}
190190
}
191191
self.expect(.Rbrace);
192-
} else if self.accept(.KwFunc) {
193-
decls.push(self.parse_func_decl(
194-
doc_comment, annotations, is_public,
195-
annotations.has("unsafe") or abi != .Rivet,
196-
abi
197-
));
198192
} else {
199193
report.error("invalid external declaration", pos);
200194
}

rivetc/src/parser.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,6 @@ def parse_decl(self):
220220
if self.tok.kind == Kind.Rbrace:
221221
break
222222
self.expect(Kind.Rbrace)
223-
elif self.accept(Kind.KwFunc):
224-
protos.append(
225-
self.parse_func_decl(
226-
doc_comment, annotations, is_public,
227-
annotations.has("unsafe") or abi != sym.ABI.Rivet, abi
228-
)
229-
)
230223
else:
231224
report.error("invalid external declaration", pos)
232225
self.inside_extern = False

0 commit comments

Comments
 (0)