Package ghidra.app.decompiler
Class PrettyPrinter
java.lang.Object
ghidra.app.decompiler.PrettyPrinter
This class is used to convert a C/C++ language
token group into readable C/C++ code.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPrettyPrinter
(Function function, ClangTokenGroup tokgroup, NameTransformer transformer) Constructs a new pretty printer using the specified C language token group. -
Method Summary
-
Field Details
-
INDENT_STRING
The indent string to use when printing.- See Also:
-
-
Constructor Details
-
PrettyPrinter
Constructs a new pretty printer using the specified C language token group. The printer takes a NameTransformer that will be applied to symbols, which can replace illegal characters in the symbol name for instance. A null indicates no transform is applied.- Parameters:
function
- is the function to be printedtokgroup
- the C language token grouptransformer
- the transformer to apply to symbols
-
-
Method Details
-
getFunction
-
getLines
Returns a list of the C language lines contained in the C language token group.- Returns:
- a list of the C language lines
-
print
Prints the C language token group into a string of C code.- Returns:
- a string of readable C code
-