Class VariableResolver
- Namespace
- RandomizerCore.Logic
- Assembly
- RandomizerCore.dll
Class which parses terms in logic as LogicVariables.
public class VariableResolver
- Inheritance
-
VariableResolver
- Inherited Members
Properties
Inner
A nested VariableResolver, which runs after the parent VariableResolver in TryMatch.
public VariableResolver? Inner { get; init; }
Property Value
Methods
CanMatch(LogicManager, string)
Returns true if the term can be matched to a LogicVariable.
public bool CanMatch(LogicManager lm, string term)
Parameters
lm
LogicManagerterm
string
Returns
GetStateModel()
Returns a StateManagerBuilder with the elements needed to support the VR's variables.
public virtual StateManagerBuilder GetStateModel()
Returns
TryMatch(LogicManager, string, out LogicInt)
[Obsolete("Use LogicVariable overload of TryMatch instead.")]
public virtual bool TryMatch(LogicManager lm, string term, out LogicInt variable)
Parameters
lm
LogicManagerterm
stringvariable
LogicInt
Returns
TryMatch(LogicManager, string, out LogicVariable)
Returns true if the term can be matched to a LogicVariable, and outputs the variable.
public virtual bool TryMatch(LogicManager lm, string term, out LogicVariable variable)
Parameters
lm
LogicManagerterm
stringvariable
LogicVariable
Returns
TryMatchPrefix(string, string, out string[])
Matches a variable identified via a prefix. The input must either equal the prefix exactly, or consist of the prefix, followed by square brackets enclosing a comma-separated list. Subexpressions within square brackets will not be split.
Outputs the comma-separated parameters list.
public static bool TryMatchPrefix(string term, string prefix, out string[] parameters)