public Variable Rename(VariableName NewName) => new Variable(NewName, ComponentValues);
public Variable(VariableName Name, IEnumerable <IGrammarExpression> ComponentValues) { this.Name = Name; this.ComponentValues = rolist(ComponentValues); }
/// <summary> /// Defines a typed varible /// </summary> /// <typeparam name="V">The variable value type</typeparam> /// <param name="name">The name of the variable</param> /// <param name="value">The value of the variable</param> /// <returns></returns> public static Variable var <V>(VariableName name, V value) => new Variable(name, literal(value));
public Variable(VariableName Name, params IGrammarExpression[] ComponentValues) { this.Name = Name; this.ComponentValues = ComponentValues.ToReadOnlyList(); }
/// <summary> /// Defines an untyped variable /// </summary> /// <param name="name">The variable name</param> /// <param name="ComponentValues">The components that comprise the value</param> /// <returns></returns> public static Variable var(VariableName name, params IGrammarExpression[] ComponentValues) => new Variable(name, ComponentValues);