Skip to content

Commit 1d9f4ab

Browse files
committed
Added #[exposed] annotation for marking symbols as exposed for foreign code to link to
1 parent 5023105 commit 1d9f4ab

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: src/parser/annotation.rs

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ impl Annotation {
1616
#[derive(Clone, Debug)]
1717
pub enum AnnotationKind {
1818
Foreign,
19+
Exposed,
1920
ThreadLocal,
2021
Packed,
2122
AbideAbi,
@@ -35,6 +36,7 @@ impl Display for AnnotationKind {
3536
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3637
f.write_str(match self {
3738
Self::Foreign => "foreign",
39+
Self::Exposed => "exposed",
3840
Self::ThreadLocal => "thread_local",
3941
Self::Packed => "packed",
4042
Self::AbideAbi => "abide_abi",

Diff for: src/parser/parse_annotation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ impl<'a, I: Inflow<Token>> Parser<'a, I> {
2525

2626
let annotation = match annotation_name.as_str() {
2727
"foreign" => AnnotationKind::Foreign,
28+
"exposed" => AnnotationKind::Exposed,
2829
"thread_local" => AnnotationKind::ThreadLocal,
2930
"packed" => AnnotationKind::Packed,
3031
"abide_abi" => AnnotationKind::AbideAbi,

0 commit comments

Comments
 (0)