Exemple #1
0
 internal Symbol(string name, string type, string display, BaseExpression expression)
 {
     Name = name;
     Type = type;
     Display = display;
     Expression = expression;
 }
Exemple #2
0
 Labeled[] GetLabel(BaseExpression expression)
 {
     if (expression is Labeled)
         return new[] { expression as Labeled };
     if (expression is Sequence)
         return (expression as Sequence).Expressions
             .SelectMany(GetLabel).Where(x => x != null).ToArray();
     if (expression is Choice)
         return (expression as Choice).Expressions
             .SelectMany(GetLabel).Where(x => x != null).ToArray();
     return new Labeled[] { };
 }
Exemple #3
0
 public Optional(BaseExpression expression)
 {
     Expression = expression;
 }