Ejemplo n.º 1
0
        public Rule(ParseResult original)
            : base(original)
        {
            Options = GetChildren<RuleOption>(0, ChildCount - 2)
                .Select(x => x.Option)
                .ToArray();

            Identifier = GetChild<Identifier>(ChildCount - 2).Value;
            Expression = GetChild<Expression>(ChildCount - 1);

            GeneratedParser = Parser.LateDefined(Identifier,
                Options.Contains("collapse") ? LateDefinedType.Collapse :
                Options.Contains("omit-from-hierarchy") ? LateDefinedType.OmitFromHierarchy :
                LateDefinedType.Default);
        }
Ejemplo n.º 2
0
 public Group(ParseResult original)
     : base(original)
 {
     Expression = GetChild<Expression>(0);
 }