Type Definition erg_compiler::error::lower::LowerError

source ·
pub type LowerError = CompileError;

Implementations§

source§

impl LowerError

source

pub fn syntax_error( input: Input, errno: usize, loc: Location, caused_by: String, desc: String, hint: Option<String> ) -> Self

source

pub fn unused_expr_warning( input: Input, errno: usize, expr: &Expr, caused_by: String ) -> Self

source

pub fn unused_subroutine_warning( input: Input, errno: usize, expr: &Expr, caused_by: String ) -> Self

source

pub fn duplicate_decl_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str ) -> Self

source

pub fn duplicate_definition_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str ) -> Self

source

pub fn violate_decl_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str, spec_t: &Type, found_t: &Type ) -> Self

source

pub fn no_var_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str, similar_name: Option<&str> ) -> Self

source

pub fn detailed_no_var_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str, similar_name: Option<&str>, similar_info: Option<&VarInfo> ) -> Self

TODO: replace no_var_error with this function

source

pub fn access_before_def_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str, defined_line: u32, similar_name: Option<&str> ) -> Self

source

pub fn access_deleted_var_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str, del_line: u32, similar_name: Option<&str> ) -> Self

source

pub fn no_type_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str, similar_name: Option<&str> ) -> Self

source

pub fn type_not_found( input: Input, errno: usize, loc: Location, caused_by: String, typ: &Type ) -> Self

source

pub fn no_attr_error( input: Input, errno: usize, loc: Location, caused_by: String, obj_t: &Type, name: &str, similar_name: Option<&str> ) -> Self

source

pub fn detailed_no_attr_error( input: Input, errno: usize, loc: Location, caused_by: String, obj_t: &Type, name: &str, similar_name: Option<&str>, similar_info: Option<&VarInfo> ) -> Self

source

pub fn singular_no_attr_error( input: Input, errno: usize, loc: Location, caused_by: String, obj_name: &str, obj_t: &Type, name: &str, similar_name: Option<&str> ) -> Self

source

pub fn reassign_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str ) -> Self

source

pub fn del_error( input: Input, errno: usize, ident: &Identifier, is_const: bool, caused_by: String ) -> Self

source

pub fn visibility_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str, vis: Visibility ) -> Self

source

pub fn override_error<S: Into<String>>( input: Input, errno: usize, name: &str, name_loc: Location, superclass: &Type, caused_by: S ) -> Self

source

pub fn inheritance_error( input: Input, errno: usize, class: String, loc: Location, caused_by: String ) -> Self

source

pub fn file_error( input: Input, errno: usize, desc: String, loc: Location, caused_by: String, hint: Option<String> ) -> Self

source

pub fn module_env_error( input: Input, errno: usize, mod_name: &str, loc: Location, caused_by: String ) -> Self

source

pub fn import_error( input: Input, errno: usize, desc: String, loc: Location, caused_by: String, similar_erg_mod: Option<Str>, similar_py_mod: Option<Str> ) -> Self

source

pub fn inner_typedef_error( input: Input, errno: usize, loc: Location, caused_by: String ) -> Self

source

pub fn declare_error( input: Input, errno: usize, loc: Location, caused_by: String ) -> Self

source

pub fn invalid_type_cast_error( input: Input, errno: usize, loc: Location, caused_by: String, name: &str, cast_to: &Type, hint: Option<String> ) -> Self