SimplifyParentheses

class SimplifyParentheses(precedenceFunction: (MathSyntax) -> Int) : FeaturedMathRendererWithPostProcess.PostProcessPhase

Removes unnecessary parentheses from OperandSyntax.

Author

Iaroslav Postovalov

Constructors

SimplifyParentheses
Link copied to clipboard
common
fun SimplifyParentheses(precedenceFunction: (MathSyntax) -> Int)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

perform
Link copied to clipboard
common
open override fun perform(node: MathSyntax)
Performs the specified action over MathSyntax.

Properties

precedenceFunction
Link copied to clipboard
common
val precedenceFunction: (MathSyntax) -> Int
Returns the precedence number for syntax node.

Sources

common source
Link copied to clipboard