public override Node Evaluate(Env env) { var value = Value.Evaluate(env); var repeatCount = RepeatCount.Evaluate(env); return(new RepeatEntity(value, repeatCount)); }
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); }
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); }
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); }
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); }
public override Node Evaluate(Env env) { return(new Url(AdjustUrlPath(Value.Evaluate(env)))); }