Parentheses

com.phasmidsoftware.number.expression.parse.ExpressionParser.Parentheses
case class Parentheses(e: ExpressionParser.this.Expr) extends Factor

Encapsulates an expression within parentheses. This class is used to enforce precedence in mathematical or logical expressions by ensuring that the enclosed expression is evaluated as a single unit.

The Parentheses class extends Factor and wraps an Expr instance, delegating evaluation and rendering tasks to the underlying expression.

Value parameters

e

the expression encapsulated within the parentheses

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def value: Try[Expression]

Evaluates the value of the expression encapsulated by the Parentheses instance. Delegates the evaluation to the underlying expression e.

Evaluates the value of the expression encapsulated by the Parentheses instance. Delegates the evaluation to the underlying expression e.

Attributes

Returns

a Try[Expression] representing the evaluation result of the expression. Returns a Success if the evaluation completes without errors, or a Failure if any error occurs.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product