Skip to content

Commit

Permalink
Finished setting up default function visibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacShelton committed Sep 28, 2024
1 parent f402ca0 commit ecadbd6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/c/translation/function.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{parameters::has_parameters, types::get_name_and_type};
use crate::{
ast::{self, AstFile, Function, Parameter, Parameters},
ast::{self, AstFile, Function, Parameter, Parameters, Privacy},
c::parser::{
error::ParseErrorKind, CTypedef, DeclarationSpecifiers, Declarator,
ParameterDeclarationCore, ParameterTypeList, ParseError,
Expand Down Expand Up @@ -81,6 +81,7 @@ pub fn declare_function(
source,
abide_abi: true,
tag: None,
privacy: Privacy::Public,
});

Ok(())
Expand Down
4 changes: 4 additions & 0 deletions src/interpreter_env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ fn thin_void_function(name: impl Into<String>, syscall_kind: InterpreterSyscallK
is_foreign: false,
source,
tag: None,
privacy: Privacy::Public,
}
}

Expand Down Expand Up @@ -74,6 +75,7 @@ fn thin_cstring_function(
is_foreign: false,
source,
tag: None,
privacy: Privacy::Public,
}
}

Expand All @@ -100,6 +102,7 @@ pub fn setup_build_system_interpreter_symbols(file: &mut AstFile) {
source,
abide_abi: false,
tag: Some(Tag::InterpreterEntryPoint),
privacy: Privacy::Public,
});

file.enums.insert(
Expand Down Expand Up @@ -220,6 +223,7 @@ pub fn setup_build_system_interpreter_symbols(file: &mut AstFile) {
is_foreign: false,
source,
tag: None,
privacy: Privacy::Public,
});
}

Expand Down
3 changes: 2 additions & 1 deletion src/pragma_section/parse.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::PragmaSection;
use crate::{
ast::{AstFile, Expr, ExprKind, Function, Parameters, Stmt, StmtKind, TypeKind},
ast::{AstFile, Expr, ExprKind, Function, Parameters, Privacy, Stmt, StmtKind, TypeKind},
diagnostics::ErrorDiagnostic,
inflow::Inflow,
name::Name,
Expand Down Expand Up @@ -91,6 +91,7 @@ impl PragmaSection {
source,
abide_abi: false,
tag: None,
privacy: Privacy::Public,
});
} else {
return Err(Box::new(ParseError::expected(
Expand Down

0 comments on commit ecadbd6

Please sign in to comment.