public FuncDef(DeclnSpecs specs, Declr declr, CompoundStmt stmt) { this.Specs = specs; this.Declr = declr; this.Stmt = stmt; }
public static FuncDef Create(Option <DeclnSpecs> declnSpecs, Declr declr, Stmt body) => new FuncDef(declnSpecs.IsSome ? declnSpecs.Value : DeclnSpecs.Empty, declr, body as CompoundStmt);
private InitDeclr(Declr declr, Option <Initr> initr) { this.Declr = declr; this.Initr = initr; }
public static InitDeclr Create(Declr declr, Option <Initr> initr) => new InitDeclr(declr, initr);
public static Declr Add(ImmutableList <PointerModifier> pointerModifiers, Declr declr) => Create(declr.Name, declr.TypeModifiers.AddRange(pointerModifiers));
public static Declr Add(Declr declr, TypeModifier typeModifier) => Create(declr.Name, declr.TypeModifiers.Add(typeModifier));
public static Declr Create(Option <ImmutableList <PointerModifier> > pointerModifiers, Declr declr) => Add(pointerModifiers.IsSome ? pointerModifiers.Value : ImmutableList <PointerModifier> .Empty, declr);
public new static StructDeclr Create(Declr declr) => new StructDeclr(Option.Some(declr.Name), declr.TypeModifiers, Option <Expr> .None);
public static ParamDeclr Create(Declr declr) => new ParamDeclr(Option.Some(declr.Name), declr.TypeModifiers);