Package ghidra.app.decompiler

# Class ClangSyntaxToken

java.lang.Object
ghidra.app.decompiler.ClangToken
ghidra.app.decompiler.ClangSyntaxToken

All Implemented Interfaces:
  `ClangNode`

public class ClangSyntaxToken extends ClangToken
A source code token which is not an operation, variable, function name, or type. Like '(' or ','. A SyntaxToken may be or may include spacing. As a special case, the token can be part of an enclosing pair of tokens, as with '(' and ')' or '{' and '}'. In this case, the token is either opening or closing and contains an id that matches it with its pair token.

- ## Field Summary

  ### Fields inherited from class ghidra.app.decompiler.ClangToken

  `COMMENT_COLOR, CONST_COLOR, DEFAULT_COLOR, ERROR_COLOR, FUNCTION_COLOR, GLOBAL_COLOR, KEYWORD_COLOR, MAX_COLOR, PARAMETER_COLOR, SPECIAL_COLOR, TYPE_COLOR, VARIABLE_COLOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClangSyntaxToken(ClangNode par)`
  `ClangSyntaxToken(ClangNode par, String txt)`
  `ClangSyntaxToken(ClangNode par, String txt, int color)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `decode(Decoder decoder, PcodeFactory pfactory)`
  Decode this token from the current position in an encoded stream
  `int`
  `getClose()`
  `int`
  `getOpen()`
  `boolean`
  `isVariableRef()`

  ### Methods inherited from class ghidra.app.decompiler.ClangToken

  `buildSpacer, buildToken, Child, flatten, getClangFunction, getHighlight, getHighSymbol, getHighVariable, getLineParent, getMaxAddress, getMinAddress, getPcodeOp, getScalar, getSyntaxType, getText, getVarnode, isMatchingToken, iterator, numChildren, Parent, setHighlight, setLineParent, setMatchingToken, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ClangSyntaxToken

    public ClangSyntaxToken(ClangNode par)

  - ### ClangSyntaxToken

    public ClangSyntaxToken(ClangNode par, String txt)

  - ### ClangSyntaxToken

    public ClangSyntaxToken(ClangNode par, String txt, int color)

- ## Method Details

  - ### isVariableRef

    public boolean isVariableRef()
    Overrides:
      `isVariableRef` in class `ClangToken`
    Returns:
      true if this token represents a variable (in source code)

  - ### decode

    public void decode(Decoder decoder, PcodeFactory pfactory) throws DecoderException
    Description copied from class: `ClangToken`
    Decode this token from the current position in an encoded stream
    Overrides:
      `decode` in class `ClangToken`
    Parameters:
      `decoder` - is the decoder for the stream
      `pfactory` - is used to look up p-code objects associated with the token
    Throws:
      `DecoderException` - for problems decoding the stream

  - ### getOpen

    public int getOpen()
    Returns:
      the pair id if this is an opening token, -1 otherwise

  - ### getClose

    public int getClose()
    Returns:
      the pair id if this is a closing token, -1 otherwise