trait Expressions extends Abstract
Unit Tests For Expressions
- Alphabetic
- By Inheritance
- Expressions
- Abstract
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait Action extends DescribedValue
Base class for all actions.
Base class for all actions. Actions are used in the "then" and "but" clauses of a Gherkin example such as in the body of a handler's
on
clause or in the definition of a Function. The subclasses define different kinds of actions that can be used.- Definition Classes
- Abstract
- trait AdaptorDefinition extends Definition
Base trait of any definition that is in the content of an adaptor
Base trait of any definition that is in the content of an adaptor
- Definition Classes
- Abstract
- trait AlwaysEmpty extends Definition
- Definition Classes
- Abstract
- case class BlockDescription(loc: Location = Location.empty, lines: Seq[LiteralString] = Seq.empty[LiteralString]) extends Description with Product with Serializable
- Definition Classes
- Abstract
- trait BrieflyDescribedValue extends RiddlValue
- Definition Classes
- Abstract
- trait Container[+D <: RiddlValue] extends RiddlValue
Base trait of any definition that is also a ContainerValue
Base trait of any definition that is also a ContainerValue
- D
The kind of definition that is contained by the container
- Definition Classes
- Abstract
- trait ContextDefinition extends Definition
Base trait of any definition that is in the content of a context
Base trait of any definition that is in the content of a context
- Definition Classes
- Abstract
- trait Definition extends DescribedValue with BrieflyDescribedValue with Container[Definition]
Base trait for all definitions requiring an identifier for the definition and providing the identify method to yield a string that provides the kind and name
Base trait for all definitions requiring an identifier for the definition and providing the identify method to yield a string that provides the kind and name
- Definition Classes
- Abstract
- trait DescribedValue extends RiddlValue
Base trait of all values that have an optional Description
Base trait of all values that have an optional Description
- Definition Classes
- Abstract
- trait Description extends RiddlValue
The description of a definition.
The description of a definition. All definitions have a name and an optional description. This class provides the description part.
- Definition Classes
- Abstract
- trait DomainDefinition extends Definition
Base trait of any definition that is in the content of a domain
Base trait of any definition that is in the content of a domain
- Definition Classes
- Abstract
- trait EntityDefinition extends Definition
Base trait of any definition that is in the content of an entity.
Base trait of any definition that is in the content of an entity.
- Definition Classes
- Abstract
- case class FileDescription(loc: Location, file: Path) extends Description with Product with Serializable
- Definition Classes
- Abstract
- trait FunctionDefinition extends Definition
Base trait of any definition that is in the content of a function.
Base trait of any definition that is in the content of a function.
- Definition Classes
- Abstract
- trait GherkinClause extends GherkinValue
Base class of one of the four Gherkin clauses (Given, When, Then, But)
Base class of one of the four Gherkin clauses (Given, When, Then, But)
- Definition Classes
- Abstract
- trait GherkinValue extends RiddlValue
Base class of any Gherkin value
Base class of any Gherkin value
- Definition Classes
- Abstract
- trait HandlerDefinition extends Definition
Base trait of definitions that are part of a Handler Definition
Base trait of definitions that are part of a Handler Definition
- Definition Classes
- Abstract
- case class Identifier(loc: Location, value: String) extends RiddlValue with Product with Serializable
A RiddlValue that is a parsed identifier, typically the name of a definition.
A RiddlValue that is a parsed identifier, typically the name of a definition.
- loc
The location in the input where the identifier starts
- value
The parsed value of the identifier
- Definition Classes
- Abstract
- trait LeafDefinition extends Definition
- Definition Classes
- Abstract
- case class LiteralString(loc: Location, s: String) extends RiddlValue with Product with Serializable
Represents a literal string parsed between quote characters in the input
Represents a literal string parsed between quote characters in the input
- loc
The location in the input of the opening quote character
- s
The parsed value of the string content
- Definition Classes
- Abstract
- trait OptionValue extends RiddlValue
Base trait for option values for any option of a definition.
Base trait for option values for any option of a definition.
- Definition Classes
- Abstract
- case class PathIdentifier(loc: Location, value: Seq[String]) extends RiddlValue with Product with Serializable
Represents a segmented identifier to a definition in the model.
Represents a segmented identifier to a definition in the model. Path Identifiers are parsed from a dot-separated list of identifiers in the input. Path identifiers are used to reference other definitions in the model.
- loc
Location in the input of the first letter of the path identifier
- value
The list of strings that make up the path identifier
- Definition Classes
- Abstract
- trait PlantDefinition extends Definition
Base trait of any definition that occurs in the body of a plant
Base trait of any definition that occurs in the body of a plant
- Definition Classes
- Abstract
- abstract class Reference[+T <: Definition] extends RiddlValue
A reference to a definition of a specific type.
A reference to a definition of a specific type.
- T
The type of definition to which the references refers.
- Definition Classes
- Abstract
- trait RiddlNode extends AnyRef
The root trait of all things RIDDL AST.
The root trait of all things RIDDL AST. Every node in the tree is a RiddlNode.
- Definition Classes
- Abstract
- trait RiddlValue extends RiddlNode
The root trait of all parsable values.
The root trait of all parsable values. If a parser returns something, its a RiddlValue. The distinguishing factor is the inclusion of the parsing location given by the
loc
field.- Definition Classes
- Abstract
- trait SagaDefinition extends Definition
Base trait of definitions that are part of a Saga Definition
Base trait of definitions that are part of a Saga Definition
- Definition Classes
- Abstract
- trait SagaStepAction extends Action
An action that can also be used in a SagaStep
An action that can also be used in a SagaStep
- Definition Classes
- Abstract
- trait StoryDefinition extends Definition
- Definition Classes
- Abstract
- trait WithOptions[T <: OptionValue] extends Definition
Base trait that can be used in any definition that takes options and ensures the options are defined, can be queried, and formatted.
Base trait that can be used in any definition that takes options and ensures the options are defined, can be queried, and formatted.
- T
The sealed base trait of the permitted options for this definition
- Definition Classes
- Abstract
- case class AggregateConstructionExpression(loc: Location, msg: Expressions.PathIdentifier, args: ArgList = ArgList()) extends Expression with Product with Serializable
A helper class for creating aggregates and messages that represents the construction of the message or aggregate value from parameters
A helper class for creating aggregates and messages that represents the construction of the message or aggregate value from parameters
- msg
A message reference that specifies the specific type of message to construct
- args
An argument list that should correspond to teh fields of the message
- case class AndCondition(loc: Location, conditions: Seq[Condition]) extends MultiCondition with Product with Serializable
And condition
And condition
- loc
Location of the and condition
- conditions
The conditions (minimum 2) that must all be true for "and" to be true
- case class ArbitraryCondition(cond: Expressions.LiteralString) extends Condition with Product with Serializable
Represents an arbitrary condition that is specified merely with a literal string.
Represents an arbitrary condition that is specified merely with a literal string. This can't be easily processed downstream but provides the author with the ability to include arbitrary ideas/concepts into an condition expression. For example in a when condition:
example foo { when "the timer has expired" }
shows the use of an arbitrary condition for the "when" part of a Gherkin example.
- cond
The arbitrary condition provided as a quoted string
- case class ArbitraryExpression(cond: Expressions.LiteralString) extends Expression with Product with Serializable
An arbitrary expression provided by a LiteralString Arbitrary expressions conform to the type based on the context in which they are found.
An arbitrary expression provided by a LiteralString Arbitrary expressions conform to the type based on the context in which they are found. Another way to think of it is that arbitrary expressions are assignment compatible with any other type For example, in an arithmetic expression like this
+(42,"number of widgets in a wack-a-mole")
the arbitrary expression given by the string conforms to a numeric type since the context is the addition of 42 and the arbitrary expression
- case class ArbitraryOperator(loc: Location, opName: Expressions.LiteralString, arguments: Seq[Expression]) extends Expression with Product with Serializable
- case class ArgList(args: ListMap[Expressions.Identifier, Expression] = ListMap
.empty[Identifier, Expression]) extends RiddlNode with Product with SerializableThe arguments of a FunctionCallExpression and AggregateConstructionExpression is a mapping between an argument name and the expression that provides the value for that argument.
The arguments of a FunctionCallExpression and AggregateConstructionExpression is a mapping between an argument name and the expression that provides the value for that argument.
- args
A mapping of Identifier to Expression to provide the arguments for the function call.
- case class ArithmeticOperator(loc: Location, operator: String, operands: Seq[Expression]) extends NumericExpression with Product with Serializable
Represents the use of an arithmetic operator or well-known function call.
Represents the use of an arithmetic operator or well-known function call. The operator can be simple like addition or subtraction or complicated like pow, sqrt, etc. There is no limit on the number of operands but defining them shouldn't be necessary as they are pre-determined by use of the name of the operator (e.g. pow takes two floating point numbers, sqrt takes one.
- loc
The location of the operator
- operator
The name of the operator (+, -, sqrt, ...)
- operands
A list of expressions that correspond to the required operands for the operator
- sealed trait Comparator extends RiddlNode
- case class Comparison(loc: Location, op: Comparator, expr1: Expression, expr2: Expression) extends Condition with Product with Serializable
Represents one of the six comparison operators
Represents one of the six comparison operators
- loc
Location of the comparison
- op
The comparison operator
- expr1
The first operand in the comparison
- expr2
The second operand in the comparison
- sealed trait Condition extends Expression
Base trait for expressions that yield a boolean value (a condition)
- case class EntityIdExpression(loc: Location, entityId: Expressions.PathIdentifier) extends Expression with Product with Serializable
A helper class for creating expressions that represent the creation of a new entity identifier for a specific kind of entity.
A helper class for creating expressions that represent the creation of a new entity identifier for a specific kind of entity.
- loc
The location of the expression in the source
- entityId
The PathIdentifier of the entity type for with the Id is created
- sealed trait Expression extends RiddlValue
Base trait of all expressions
- case class False(loc: Location) extends Condition with Product with Serializable
A condition value for "false"
A condition value for "false"
- loc
The location of this expression value
- case class FunctionCallCondition(loc: Location, name: Expressions.PathIdentifier, arguments: ArgList) extends Condition with Product with Serializable
A RIDDL Function call to the function identified by its path identifier with a matching set of arguments.
A RIDDL Function call to the function identified by its path identifier with a matching set of arguments. This function must return a boolean since it is defined as a Condition.
- loc
The location of the function call expression
- name
The path identifier of the RIDDL Function being called
- arguments
An ArgList to pass to the function.
- case class FunctionCallExpression(loc: Location, name: Expressions.PathIdentifier, arguments: ArgList) extends Expression with Product with Serializable
A RIDDL Function call.
A RIDDL Function call. The only callable thing here is a function identified by its path identifier with a matching set of arguments
- loc
The location of the function call expression
- name
The path identifier of the RIDDL Function being called
- arguments
An ArgList to pass to the function.
- case class GroupExpression(loc: Location, expressions: Seq[Expression]) extends Expression with Product with Serializable
A syntactic convenience for grouping a list of expressions.
A syntactic convenience for grouping a list of expressions.
- loc
The location of the expression group
- expressions
The expressions that are grouped
- case class LiteralDecimal(loc: Location, d: BigDecimal) extends NumericExpression with Product with Serializable
An expression that is a liberal constant decimal value
An expression that is a liberal constant decimal value
- loc
The location of the decimal value
- d
The decimal number to use as the value of the expression
- case class LiteralInteger(loc: Location, n: BigInt) extends NumericExpression with Product with Serializable
An expression that is a literal constant integer value
An expression that is a literal constant integer value
- loc
The location of the integer value
- n
The number to use as the value of the expression
- abstract class MultiCondition extends Condition
Base class for conditions with two operands
- case class NotCondition(loc: Location, cond1: Condition) extends Condition with Product with Serializable
Not condition
Not condition
- loc
Location of the not condition
- cond1
The condition being negated
- sealed trait NumericExpression extends Expression
Base trait for expressions that yield a numeric value
- case class OrCondition(loc: Location, conditions: Seq[Condition]) extends MultiCondition with Product with Serializable
Or condition
Or condition
- loc
Location of the
or
condition- conditions
The conditions (minimum 2), any one of which must be true for "Or" to be true
- case class Ternary(loc: Location, condition: Condition, expr1: Expression, expr2: Expression) extends Expression with Product with Serializable
Ternary operator to accept a conditional and two expressions and choose one of the expressions as the resulting value based on the conditional.
Ternary operator to accept a conditional and two expressions and choose one of the expressions as the resulting value based on the conditional.
- loc
The location of the ternary operator
- condition
The conditional expression that determines the result
- expr1
An expression for the result if the condition is true
- expr2
An expression for the result if the condition is false
- case class True(loc: Location) extends Condition with Product with Serializable
A condition value for "true"
A condition value for "true"
- loc
The location of this expression value
- case class UndefinedExpression(loc: Location) extends Expression with Product with Serializable
Represents a expression that will be specified later and uses the ??? syntax to represent that condition.
Represents a expression that will be specified later and uses the ??? syntax to represent that condition.
- loc
The location of the undefined condition
- case class ValueCondition(loc: Location, path: Expressions.PathIdentifier) extends Condition with Product with Serializable
Represents a condition that is merely a reference to some Boolean value, presumably an entity state value or parameter.
Represents a condition that is merely a reference to some Boolean value, presumably an entity state value or parameter.
- loc
The location of this condition
- path
The path to the value for this condition
- case class ValueExpression(loc: Location, path: Expressions.PathIdentifier) extends Expression with Product with Serializable
Represents an expression that is merely a reference to some value, presumably an entity state value.
Represents an expression that is merely a reference to some value, presumably an entity state value. Since it can be a boolean value, it is also a condition
- loc
The location of this expression
- path
The path to the value for this expression
- case class XorCondition(loc: Location, conditions: Seq[Condition]) extends MultiCondition with Product with Serializable
Xor condition
Xor condition
- loc
Location of the
xor
condition- conditions
The conditions (minimum 2), only one of which may be true for "xor" to be true.
Value Members
- object Identifier extends Serializable
- Definition Classes
- Abstract
- object LiteralString extends Serializable
- Definition Classes
- Abstract
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- case object eq extends Comparator with Product with Serializable
- case object ge extends Comparator with Product with Serializable
- case object gt extends Comparator with Product with Serializable
- case object le extends Comparator with Product with Serializable
- case object lt extends Comparator with Product with Serializable
- case object ne extends Comparator with Product with Serializable
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated