Classes
The following classes are available globally.
-
The only responsibility of the
See moreInterpreterContextclass is to store variables, and keep them during the execution, where multiple expressions might use the same set of variables.Declaration
Swift
public class Context -
See moreKeywordinstances are used to provide static points in match sequences so that they can be used as pillars of the expressions the developer tries to matchDeclaration
Swift
public class Keyword : PatternElement, Equatable -
Generic superclass of
See moreVariables which are aware of theirInterpreterclasses, as they use it when mapping their valuesDeclaration
Swift
public class GenericVariable<T, I> : VariableProtocol, PatternElement, Equatable where I : Interpreter -
This interpreter is used to evaluate string expressions and return a transformed string, replacing the content where it matches certain patterns. Typically used in web applications, where the rendering of an HTML page is provided as a template, and the application replaces certain statements, based on input parameters.
See moreDeclaration
Swift
open class TemplateInterpreter<T> : Interpreter -
This interpreter is used to evaluate string expressions and return a transformed string, replacing the content where it matches certain patterns. Typically used in web applications, where the rendering of an HTML page is provided as a template, and the application replaces certain statements, based on input parameters.
See moreDeclaration
Swift
public class StringTemplateInterpreter : TemplateInterpreter<String> -
A special kind of variable that is used in case of
See moreStringTemplateInterpreters. It does not convert its content using theinterpreterForEvaluatingVariablesbut always uses theStringTemplateInterpreterinstance. It’s perfect for expressions, that have a body, that needs to be further interpreted, such as an if or while statement.Declaration
Swift
public class TemplateVariable : GenericVariable<String, StringTemplateInterpreter> -
A type of interpreter implementation that is capable of evaluating arbitrary string expressions to strongly typed variables
See moreDeclaration
Swift
public class TypedInterpreter : Interpreter, Printer -
The implementation of a
See moreDataTypeuses theDataTypeProtocolto convert input to a strongly typed data and print it if neededDeclaration
Swift
public class DataType<T> : DataTypeProtocol -
See moreFunctions can process values in givenDataTypes, allowing the expressions to be feature-richDeclaration
Swift
public class Function<T> : FunctionProtocol -
Variablerepresents a named placeholder, so when the matcher recognises a pattern, the values of the variables are passed to them in a block.Declaration
Swift
public class Variable<T> : GenericVariable<T, TypedInterpreter> -
A processor that can process a raw value with extra information, such as interpreter and context
See moreDeclaration
Swift
internal class VariableProcessor<E> : VariableProcessorProtocol where E : Interpreter -
This class provides the main logic of the
See moreEvalframework, performing the pattern matching detailsDeclaration
Swift
internal class Matcher -
Pattern consists of array of elements
See moreDeclaration
Swift
public class Pattern<T, I> : PatternProtocol where I : Interpreter
View on GitHub
Install in Dash
Classes Reference