lineformatter module¶
Class |
Description |
---|---|
|
|
|
|
- class CoreLineFormatter[source]
Bases:
LineFormatter
- __init__(handle: BNLineFormatter)[source]
- Parameters:
handle (BNLineFormatter) –
- format_lines(in_lines: List[DisassemblyTextLine], settings: LineFormatterSettings) List[DisassemblyTextLine] [source]
Reformats the given list of lines. Returns a new list of lines containing the reformatted code.
- Parameters:
in_lines (List[DisassemblyTextLine]) –
settings (LineFormatterSettings) –
- Return type:
- class LineFormatter[source]
Bases:
object
class LineFormatter
represents a custom line formatter, which can reformat code in High Level IL and high level language representations.- __init__(handle=None)[source]
- format_lines(in_lines: List[DisassemblyTextLine], settings: LineFormatterSettings) List[DisassemblyTextLine] [source]
Reformats the given list of lines. Returns a new list of lines containing the reformatted code.
- Parameters:
in_lines (List[DisassemblyTextLine]) –
settings (LineFormatterSettings) –
- Return type:
- register()[source]
Registers the line formatter.
- formatter_name = None
- property name: str
- class LineFormatterSettings[source]
Bases:
object
LineFormatterSettings(hlil: binaryninja.highlevelil.HighLevelILFunction, desired_line_length: int, minimum_content_length: int, tab_width: int, language_name: Optional[str], comment_start_string: str, comment_end_string: str, annotation_start_string: str, annotation_end_string: str)
- __init__(hlil: HighLevelILFunction, desired_line_length: int, minimum_content_length: int, tab_width: int, language_name: str | None, comment_start_string: str, comment_end_string: str, annotation_start_string: str, annotation_end_string: str) None
- static default(settings: DisassemblySettings | None, hlil: HighLevelILFunction) LineFormatterSettings [source]
Gets the default line formatter settings for High Level IL code.
- Parameters:
settings (DisassemblySettings | None) –
hlil (HighLevelILFunction) –
- Return type:
- static language_representation_settings(settings: DisassemblySettings | None, func: LanguageRepresentationFunction) LineFormatterSettings [source]
Gets the default line formatter settings for a language representation function.
- Parameters:
settings (DisassemblySettings | None) –
func (LanguageRepresentationFunction) –
- Return type:
- annotation_end_string: str
- annotation_start_string: str
- comment_end_string: str
- comment_start_string: str
- desired_line_length: int
- hlil: HighLevelILFunction
- minimum_content_length: int
- tab_width: int
CoreLineFormatter¶
- class CoreLineFormatter[source]¶
Bases:
LineFormatter
- format_lines(in_lines: List[DisassemblyTextLine], settings: LineFormatterSettings) List[DisassemblyTextLine] [source]¶
Reformats the given list of lines. Returns a new list of lines containing the reformatted code.
- Parameters:
in_lines (List[DisassemblyTextLine]) –
settings (LineFormatterSettings) –
- Return type:
LineFormatter¶
- class LineFormatter[source]¶
Bases:
object
class LineFormatter
represents a custom line formatter, which can reformat code in High Level IL and high level language representations.- format_lines(in_lines: List[DisassemblyTextLine], settings: LineFormatterSettings) List[DisassemblyTextLine] [source]¶
Reformats the given list of lines. Returns a new list of lines containing the reformatted code.
- Parameters:
in_lines (List[DisassemblyTextLine]) –
settings (LineFormatterSettings) –
- Return type:
- formatter_name = None¶
LineFormatterSettings¶
- class LineFormatterSettings[source]¶
Bases:
object
LineFormatterSettings(hlil: binaryninja.highlevelil.HighLevelILFunction, desired_line_length: int, minimum_content_length: int, tab_width: int, language_name: Optional[str], comment_start_string: str, comment_end_string: str, annotation_start_string: str, annotation_end_string: str)
- __init__(hlil: HighLevelILFunction, desired_line_length: int, minimum_content_length: int, tab_width: int, language_name: str | None, comment_start_string: str, comment_end_string: str, annotation_start_string: str, annotation_end_string: str) None ¶
- static default(settings: DisassemblySettings | None, hlil: HighLevelILFunction) LineFormatterSettings [source]¶
Gets the default line formatter settings for High Level IL code.
- Parameters:
settings (DisassemblySettings | None) –
hlil (HighLevelILFunction) –
- Return type:
- static language_representation_settings(settings: DisassemblySettings | None, func: LanguageRepresentationFunction) LineFormatterSettings [source]¶
Gets the default line formatter settings for a language representation function.
- Parameters:
settings (DisassemblySettings | None) –
func (LanguageRepresentationFunction) –
- Return type:
- hlil: HighLevelILFunction¶