deimos-lang/src/std_core/mod.rs
2025-05-21 08:54:21 -05:00

15 lines
646 B
Rust

use crate::name_analysis::symbol::{FunctionSymbol, ParameterSymbol};
use crate::name_analysis::symbol_table::{SymbolInsertError, SymbolTable};
pub fn add_std_core_symbols(symbol_table: &mut SymbolTable) -> Result<(), SymbolInsertError> {
symbol_table.insert_function_symbol(
FunctionSymbol::new("std::core::println", "println", true, true, None)
.with_parameters(vec![ParameterSymbol::new("msg", None)]),
)?;
symbol_table.insert_function_symbol(
FunctionSymbol::new("std::core::print", "print", true, true, None)
.with_parameters(vec![ParameterSymbol::new("msg", None)]),
)?;
Ok(())
}