pub struct HighLevelILTokenEmitter { /* private fields */ }Implementations§
Source§impl HighLevelILTokenEmitter
impl HighLevelILTokenEmitter
Sourcepub fn current_tokens(&self) -> Array<InstructionTextToken>
pub fn current_tokens(&self) -> Array<InstructionTextToken>
Returns the list of InstructionTextToken on the current line.
Sourcepub fn lines(&self) -> Array<DisassemblyTextLine>
pub fn lines(&self) -> Array<DisassemblyTextLine>
Returns the list of DisassemblyTextLine in the output.
pub fn prepend_collapse_blank_indicator(&self)
pub fn prepend_collapse_indicator( &self, context: InstructionTextTokenContext, hash: u64, )
pub fn has_collapsible_regions(&self) -> bool
pub fn set_has_collapsible_regions(&self, state: bool)
pub fn append(&self, token: InstructionTextToken)
Sourcepub fn increase_indent(&self)
pub fn increase_indent(&self)
Increases the indentation level by one.
Sourcepub fn decrease_indent(&self)
pub fn decrease_indent(&self)
Decreases the indentation level by one.
Sourcepub fn scope_separator(&self)
pub fn scope_separator(&self)
Indicates that visual separation of scopes is desirable at the current position.
By default, this will insert a blank line, but this can be configured by the user.
Sourcepub fn begin_scope(&self, ty: ScopeType)
pub fn begin_scope(&self, ty: ScopeType)
Begins a new scope. Insertion of newlines and braces will be handled using the current settings.
Sourcepub fn end_scope(&self, ty: ScopeType)
pub fn end_scope(&self, ty: ScopeType)
Ends the current scope.
The type ty should be equal to what was passed to HighLevelILTokenEmitter::begin_scope.
Sourcepub fn scope_continuation(&self, force_same_line: bool)
pub fn scope_continuation(&self, force_same_line: bool)
Continues the previous scope with a new associated scope. This is most commonly used for else statements.
If force_same_line is true, the continuation will always be placed on the same line as the previous scope.
Sourcepub fn finalize_scope(&self)
pub fn finalize_scope(&self)
Finalizes the previous scope, indicating that there are no more associated scopes.
Sourcepub fn no_indent_for_this_line(&self)
pub fn no_indent_for_this_line(&self)
Forces there to be no indentation for the next line.
Sourcepub fn begin_force_zero_confidence(&self)
pub fn begin_force_zero_confidence(&self)
Begins a region of tokens that always have zero confidence.
Sourcepub fn end_force_zero_confidence(&self)
pub fn end_force_zero_confidence(&self)
Ends a region of tokens that always have zero confidence.
Sourcepub fn set_current_expr(
&self,
expr: TokenEmitterExpr,
) -> CurrentTokenEmitterExpr
pub fn set_current_expr( &self, expr: TokenEmitterExpr, ) -> CurrentTokenEmitterExpr
Sets the current expression. Returning the CurrentTokenEmitterExpr which when dropped
will restore the previously active TokenEmitterExpr.
Sourcepub fn append_open_paren(&self)
pub fn append_open_paren(&self)
Appends (.
Sourcepub fn append_close_paren(&self)
pub fn append_close_paren(&self)
Appends ).
Sourcepub fn append_open_bracket(&self)
pub fn append_open_bracket(&self)
Appends [.
Sourcepub fn append_close_bracket(&self)
pub fn append_close_bracket(&self)
Appends ].
Sourcepub fn append_open_brace(&self)
pub fn append_open_brace(&self)
Appends {.
Sourcepub fn append_close_brace(&self)
pub fn append_close_brace(&self)
Appends }.
Sourcepub fn append_semicolon(&self)
pub fn append_semicolon(&self)
Appends ;.
Sourcepub fn set_brace_requirement(&self, required: BraceRequirement)
pub fn set_brace_requirement(&self, required: BraceRequirement)
Sets the requirement for insertion of braces around scopes in the output.
Sourcepub fn set_braces_around_switch_cases(&self, braces: bool)
pub fn set_braces_around_switch_cases(&self, braces: bool)
Sets whether cases within switch statements should always have braces around them.
Sourcepub fn set_default_braces_on_same_line(&self, same_line: bool)
pub fn set_default_braces_on_same_line(&self, same_line: bool)
Sets whether braces should default to being on the same line as the statement that begins the scope.
If the user has explicitly set a preference, this setting will be ignored and the user’s preference will be used instead.
Sourcepub fn set_simple_scope_allowed(&self, allowed: bool)
pub fn set_simple_scope_allowed(&self, allowed: bool)
Sets whether omitting braces around single-line scopes is allowed.
pub fn brace_requirement(&self) -> BraceRequirement
pub fn has_braces_around_switch_cases(&self) -> bool
pub fn default_braces_on_same_line(&self) -> bool
pub fn is_simple_scope_allowed(&self) -> bool
Sourcepub fn append_size_token(&self, size: usize, ty: InstructionTextTokenType)
pub fn append_size_token(&self, size: usize, ty: InstructionTextTokenType)
Appends a size token for the given size in the High Level IL syntax.
Sourcepub fn append_float_size_token(&self, size: usize, ty: InstructionTextTokenType)
pub fn append_float_size_token(&self, size: usize, ty: InstructionTextTokenType)
Appends a floating point size token for the given size in the High Level IL syntax.
Sourcepub fn append_var_text_token(
&self,
func: &HighLevelILFunction,
var: Variable,
expr_index: usize,
size: usize,
)
pub fn append_var_text_token( &self, func: &HighLevelILFunction, var: Variable, expr_index: usize, size: usize, )
Appends tokens for access to a variable.
Sourcepub fn append_integer_text_token(
&self,
func: &HighLevelILFunction,
expr_index: usize,
val: i64,
size: usize,
)
pub fn append_integer_text_token( &self, func: &HighLevelILFunction, expr_index: usize, val: i64, size: usize, )
Appends tokens for a constant integer value.
Sourcepub fn append_array_index_token(
&self,
func: &HighLevelILFunction,
expr_index: usize,
val: i64,
size: usize,
address: Option<u64>,
)
pub fn append_array_index_token( &self, func: &HighLevelILFunction, expr_index: usize, val: i64, size: usize, address: Option<u64>, )
Appends tokens for accessing an array by constant index.
Sourcepub fn append_pointer_text_token(
&self,
func: &HighLevelILFunction,
expr_index: usize,
val: i64,
settings: &DisassemblySettings,
symbol_display: SymbolDisplayType,
precedence: OperatorPrecedence,
allow_short_string: bool,
) -> SymbolDisplayResult
pub fn append_pointer_text_token( &self, func: &HighLevelILFunction, expr_index: usize, val: i64, settings: &DisassemblySettings, symbol_display: SymbolDisplayType, precedence: OperatorPrecedence, allow_short_string: bool, ) -> SymbolDisplayResult
Appends tokens for displaying a constant pointer value.
If allow_short_string is true, then a string will be shown even if it is “short”.
Sourcepub fn append_constant_text_token(
&self,
func: &HighLevelILFunction,
expr_index: usize,
val: i64,
size: usize,
settings: &DisassemblySettings,
precedence: OperatorPrecedence,
)
pub fn append_constant_text_token( &self, func: &HighLevelILFunction, expr_index: usize, val: i64, size: usize, settings: &DisassemblySettings, precedence: OperatorPrecedence, )
Appends tokens for a constant value.
Trait Implementations§
Source§impl Hash for HighLevelILTokenEmitter
impl Hash for HighLevelILTokenEmitter
Source§impl PartialEq for HighLevelILTokenEmitter
impl PartialEq for HighLevelILTokenEmitter
Source§impl ToOwned for HighLevelILTokenEmitter
impl ToOwned for HighLevelILTokenEmitter
Source§type Owned = Ref<HighLevelILTokenEmitter>
type Owned = Ref<HighLevelILTokenEmitter>
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
impl Eq for HighLevelILTokenEmitter
impl Send for HighLevelILTokenEmitter
impl StructuralPartialEq for HighLevelILTokenEmitter
impl Sync for HighLevelILTokenEmitter
Auto Trait Implementations§
impl Freeze for HighLevelILTokenEmitter
impl RefUnwindSafe for HighLevelILTokenEmitter
impl Unpin for HighLevelILTokenEmitter
impl UnwindSafe for HighLevelILTokenEmitter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more