Skip to content

procedure declaration with varargs are not supported. #246

Description

@JBontes

Fix:

varargs is a kind of external directive.

type
  TAttributeValue = (atAsm, atTrue, atFunction, atProcedure, atOperator, atClassOf, atClass,
    atConst, atConstructor, atDestructor, atEnum, atInterface, atNil, atNumeric,
    atOut, atPointer, atName, atString, atSubRange, atVar, atType{ExplicitType},
    atObject, atSealed, atAbstract, atBegin, atOf_Object{procedure of object},
    atVarargs, atExternal{Varargs and external are mutually exclusive});

procedure TPasSyntaxTreeBuilder.DirectiveVarargs;
begin
  FStack.Push(ntExternal).Attribute[anKind]:= AttributeValues[atVarArgs];
  try
    inherited;
  finally
    FStack.Pop;
  end;
end;

procedure TPasSyntaxTreeBuilder.ExternalDirective;
begin
  FStack.Push(ntExternal).Attribute[anKind]:= AttributeValues[atExternal];
  try
    inherited;
  finally
    FStack.Pop;
  end;
end;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions