Skip to content

Annotations Syntax #7

Description

@iamcarbon

Annotations allow arbitrary metadata to be assigned to a property or type. They are defined after the formal type or property definition using an @ prefixed named. Each annotation may define a argument list within parenthesis. If parenthesis are used, at least one argument MUST be provided.

Arguments may be named.

Int32 type @primitive @size(4) { }

Point type : Vector3<Number> @size(32) { 
  w: Number @serializable(pack: true, index: 4)
}

Syntax & Expression representations:

AnnotationExpression { arguments: ArgumentSyntax[] )
AnnotationExpressionSyntax { arguments: IArguments }

Special annotations.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions