Ghidra Decompiler Analysis Engine
Public Types | Public Attributes | List of all members
OpToken Class Reference

A token representing an operator in the high-level language. More...

#include <printlanguage.hh>

Collaboration diagram for OpToken:
Collaboration graph
[legend]

Public Types

enum  tokentype {
  binary, unary_prefix, postsurround, presurround,
  space, hiddenfunction
}
 The possible types of operator token. More...
 

Public Attributes

const char * print
 Printing characters for the token.
 
int4 stage
 Additional elements consumed from the RPN stack when emitting this token.
 
int4 precedence
 Precedence level of this token (higher binds more tightly)
 
bool associative
 True if the operator is associative.
 
tokentype type
 The basic token type.
 
int4 spacing
 Spaces to print around operator.
 
int4 bump
 Spaces to indent if we break here.
 
OpTokennegate
 The token representing the negation of this token.
 

Detailed Description

A token representing an operator in the high-level language.

The token knows how to print itself and other syntax information like precedence level and associativity within the language, desired spacing, and how operator groups its input expressions. Note that an operator has a broader meaning than just p-code operators in this context.

Member Enumeration Documentation

◆ tokentype

The possible types of operator token.

Enumerator
binary 

Binary operator form (printed between its inputs)

unary_prefix 

Unary operator form (printed before its input)

postsurround 

Function or array operator form.

presurround 

Modifier form (like a cast operation)

space 

No explicitly printed token.

hiddenfunction 

Operation that isn't explicitly printed.


The documentation for this class was generated from the following file: