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 intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionClangToken(ClangNode par) ClangToken(ClangNode par, String txt) ClangToken(ClangNode par, String txt, int color) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClangTokenbuildSpacer(ClangNode par, int indent, String indentStr) static ClangTokenbuildToken(int node, ClangNode par, Decoder decoder, PcodeFactory pfactory) Child(int i) voiddecode(Decoder decoder, PcodeFactory pfactory) voidGet the high-level variable associate with this token or null otherwiseMany tokens directly represent a pcode operator in the data-flowintgetText()Many tokens directly represent a variable in the data-flowbooleanbooleanintParent()voidsetHighlight(Color val) voidsetLineParent(ClangLine line) voidsetMatchingToken(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:
getMinAddressin interfaceClangNode
-
getMaxAddress
- Specified by:
getMaxAddressin interfaceClangNode
-
numChildren
public int numChildren()- Specified by:
numChildrenin interfaceClangNode
-
Child
-
getClangFunction
- Specified by:
getClangFunctionin interfaceClangNode
-
setHighlight
- Specified by:
setHighlightin 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
-