예제 #1
0
        public override Node Evaluate(Env env)
        {
            var value       = Value.Evaluate(env);
            var repeatCount = RepeatCount.Evaluate(env);

            return(new RepeatEntity(value, repeatCount));
        }
예제 #2
0
        public override Node Evaluate(Env env)
        {
            env.Rule = this;

            if (Value == null)
            {
                throw new ParsingException("No value found for rule " + Name, Index);
            }

            var rule = new Rule(Name, Value.Evaluate(env)).ReducedFrom <Rule>(this);

            rule.PostNameComments = this.PostNameComments;

            env.Rule = null;

            return(rule);
        }
예제 #3
0
        public override Node Evaluate(Env env)
        {
            env.Rule = this;

            if (Value == null)
            {
                throw new ParsingException("No value found for rule " + Name, Index);
            }

            var rule = new Rule(Name, Value.Evaluate(env))
            {
                Index = Index
            };

            env.Rule = null;

            return(rule);
        }
예제 #4
0
        public override Node Evaluate(Env env)
        {
            env.Rule = this;

            if (Value == null)
            {
                throw new ParsingException("No value found for rule " + Name, Location);
            }

            var rule = new Rule(EvaluateName(env), Value.Evaluate(env)).ReducedFrom <Rule>(this);

            rule.IsSemiColonRequired = this.IsSemiColonRequired;
            rule.PostNameComments    = this.PostNameComments;

            env.Rule = null;

            return(rule);
        }
예제 #5
0
        public override Node Evaluate(Env env)
        {
            env.Frames.Push(this);

            if (Features)
            {
                Features = Features.Evaluate(env);
            }

            if (Rules != null)
            {
                Rules = new NodeList(Rules.Select(r => r.Evaluate(env))).ReducedFrom <NodeList>(Rules);
            }
            else
            {
                Value = Value.Evaluate(env);
            }

            env.Frames.Pop();

            return(this);
        }
예제 #6
0
 public override Node Evaluate(Env env)
 {
     return(new Url(AdjustUrlPath(Value.Evaluate(env))));
 }