public InheritedAttribute( Action <SynthesizedAttributeContext <T> > action) { var ctx = new SynthesizedAttributeContext <T>(); action(ctx); Productions = ctx.Productions; }
public SynthesizedAttribute( Action <SynthesizedAttributeContext <T> > action, Func <T, T, T> aggregationFunction) { var ctx = new SynthesizedAttributeContext <T>(); action(ctx); Productions = ctx.Productions; AggregationFunction = aggregationFunction ?? ((a, b) => a); }