Classes
The following classes are available globally.
-
The only responsibility of the
See moreInterpreterContext
class 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 moreKeyword
instances 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 moreVariable
s which are aware of theirInterpreter
classes, 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 moreStringTemplateInterpreter
s. It does not convert its content using theinterpreterForEvaluatingVariables
but always uses theStringTemplateInterpreter
instance. 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 moreDataType
uses theDataTypeProtocol
to convert input to a strongly typed data and print it if neededDeclaration
Swift
public class DataType<T> : DataTypeProtocol
-
See moreFunction
s can process values in givenDataType
s, allowing the expressions to be feature-richDeclaration
Swift
public class Function<T> : FunctionProtocol
-
Variable
represents 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 moreEval
framework, 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