This class is used to indicate an invalid or erroneous factor within an expression. A "bad factor" effectively serves as a placeholder for scenarios where parsing or constructing a valid factor is not possible. It extends the Factor class, providing specific behavior for error handling and formatted display of the associated expression.
Value parameters
x
the associated expression that led to the creation of this "bad factor".
Computes the value of the factor but always results in a failure. The resulting failure contains a ParseException with a message composed of a newline followed by the formatted expression representation of the factor.
Computes the value of the factor but always results in a failure. The resulting failure contains a ParseException with a message composed of a newline followed by the formatted expression representation of the factor.
Attributes
Returns
a Try[T], which will always be a Failure containing a ParseException.