Hide implied extensions for arithmetic ops

This commit is contained in:
caheckman 2019-05-09 17:35:57 -04:00
parent 706960a139
commit 8860979785
6 changed files with 139 additions and 56 deletions

View file

@ -87,6 +87,7 @@ public:
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
};
const char *print; ///< Printing characters for the token
int4 stage; ///< Additional elements consumed from the RPN stack when emitting this token
@ -96,7 +97,6 @@ public:
int4 spacing; ///< Spaces to print around operator
int4 bump; ///< Spaces to indent if we break here
OpToken *negate; ///< The token representing the negation of this token
bool parentheses(const OpToken &op2,int4 stage) const;
};
/// \brief The base class API for emitting a high-level language
@ -263,6 +263,7 @@ protected:
void pushVnExplicit(const Varnode *vn,const PcodeOp *op); ///< Push an explicit variable onto the RPN stack
void pushVnLHS(const Varnode *vn,const PcodeOp *op); ///< Push a variable as the left-hand side of an expression
bool parentheses(const OpToken *op2); ///< Determine if the given token should be emitted in its own parenthetic expression
void emitOp(const ReversePolish &entry); ///< Send an operator token from the RPN to the emitter
void emitAtom(const Atom &atom); ///< Send an variable token from the RPN to the emitter
static bool unicodeNeedsEscape(int4 codepoint); ///< Determine if the given codepoint needs to be escaped