28 lines
761 B
Rust
28 lines
761 B
Rust
use crate::name_analysis::symbol::{FunctionSymbol, Symbol, TypeSymbol};
|
|
use crate::name_analysis::symbol_table::{SymbolInsertError, SymbolTable};
|
|
|
|
pub fn add_std_core_symbols(symbol_table: &mut SymbolTable) -> Result<(), SymbolInsertError> {
|
|
symbol_table.insert_type_symbol(
|
|
TypeSymbol::new("std::core:Array", "Array", true, None),
|
|
)?;
|
|
symbol_table.insert_function_symbol(
|
|
FunctionSymbol::new(
|
|
"std::core::println",
|
|
"println",
|
|
true,
|
|
true,
|
|
None,
|
|
),
|
|
)?;
|
|
symbol_table.insert_function_symbol(
|
|
FunctionSymbol::new(
|
|
"std::core::print",
|
|
"print",
|
|
true,
|
|
true,
|
|
None,
|
|
),
|
|
)?;
|
|
Ok(())
|
|
}
|