Exemple #1
0
 public Variable Rename(VariableName NewName)
 => new Variable(NewName, ComponentValues);
Exemple #2
0
 public Variable(VariableName Name, IEnumerable <IGrammarExpression> ComponentValues)
 {
     this.Name            = Name;
     this.ComponentValues = rolist(ComponentValues);
 }
Exemple #3
0
 /// <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));
Exemple #4
0
 public Variable(VariableName Name, params IGrammarExpression[] ComponentValues)
 {
     this.Name            = Name;
     this.ComponentValues = ComponentValues.ToReadOnlyList();
 }
Exemple #5
0
 /// <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);