Package ghidra.app.decompiler
Class ClangToken
java.lang.Object
ghidra.app.decompiler.ClangToken
- All Implemented Interfaces:
ClangNode
- Direct Known Subclasses:
ClangBreak
,ClangCommentToken
,ClangFieldToken
,ClangFuncNameToken
,ClangLabelToken
,ClangOpToken
,ClangSyntaxToken
,ClangTypeToken
,ClangVariableToken
Class representing a C code language token
May contain links back to pcode object
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionClangToken
(ClangNode par) ClangToken
(ClangNode par, String txt) ClangToken
(ClangNode par, String txt, int color) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClangToken
buildSpacer
(ClangNode par, int indent, String indentStr) static ClangToken
buildToken
(int node, ClangNode par, Decoder decoder, PcodeFactory pfactory) Child
(int i) void
decode
(Decoder decoder, PcodeFactory pfactory) void
Get the high-level variable associate with this token or null otherwiseMany tokens directly represent a pcode operator in the data-flowint
getText()
Many tokens directly represent a variable in the data-flowboolean
boolean
int
Parent()
void
setHighlight
(Color val) void
setLineParent
(ClangLine line) void
setMatchingToken
(boolean matchingToken) toString()
-
Field Details
-
KEYWORD_COLOR
public static final int KEYWORD_COLOR- See Also:
-
COMMENT_COLOR
public static final int COMMENT_COLOR- See Also:
-
TYPE_COLOR
public static final int TYPE_COLOR- See Also:
-
FUNCTION_COLOR
public static final int FUNCTION_COLOR- See Also:
-
VARIABLE_COLOR
public static final int VARIABLE_COLOR- See Also:
-
CONST_COLOR
public static final int CONST_COLOR- See Also:
-
PARAMETER_COLOR
public static final int PARAMETER_COLOR- See Also:
-
GLOBAL_COLOR
public static final int GLOBAL_COLOR- See Also:
-
DEFAULT_COLOR
public static final int DEFAULT_COLOR- See Also:
-
ERROR_COLOR
public static final int ERROR_COLOR- See Also:
-
SPECIAL_COLOR
public static final int SPECIAL_COLOR- See Also:
-
MAX_COLOR
public static final int MAX_COLOR- See Also:
-
-
Constructor Details
-
ClangToken
-
ClangToken
-
ClangToken
-
-
Method Details
-
Parent
-
getLineParent
-
setLineParent
-
getMinAddress
- Specified by:
getMinAddress
in interfaceClangNode
-
getMaxAddress
- Specified by:
getMaxAddress
in interfaceClangNode
-
numChildren
public int numChildren()- Specified by:
numChildren
in interfaceClangNode
-
Child
-
getClangFunction
- Specified by:
getClangFunction
in interfaceClangNode
-
setHighlight
- Specified by:
setHighlight
in interfaceClangNode
-
getHighlight
-
setMatchingToken
public void setMatchingToken(boolean matchingToken) -
isMatchingToken
public boolean isMatchingToken() -
isVariableRef
public boolean isVariableRef() -
getSyntaxType
public int getSyntaxType() -
getText
-
decode
- Throws:
DecoderException
-
flatten
-
buildToken
public static ClangToken buildToken(int node, ClangNode par, Decoder decoder, PcodeFactory pfactory) throws DecoderException - Throws:
DecoderException
-
buildSpacer
-
toString
-
getHighVariable
Get the high-level variable associate with this token or null otherwise- Returns:
- HighVariable
-
getVarnode
Many tokens directly represent a variable in the data-flow- Returns:
- the variable (Varnode) associated with this token or null
-
getPcodeOp
Many tokens directly represent a pcode operator in the data-flow- Returns:
- the operation (PcodeOp) associated with this token or null
-