Skip to content

Attribute docs lack imporant syntax details #86

@Tbusk

Description

@Tbusk

Hi, when going through the docs, the attribute docs fail to define that you can have multiple names in a single attribute statement.
https://docs.vala.dev/tutorials/programming-language/main/02-00-basics/02-08-code-attributes.html

The following are valid attributes:

[Flags, CCode (cname = "int", cprefix = "SDL_INIT_", has_type_id = false)]
...

[Diagnostics, SimpleType, CCode (cname = "cname_property", has_type_id = false)]
...

[CCode (cname = "cname_property", has_type_id = false), Diagnostics, SimpleType]
...

[Diagnostics, CCode (cname = "cname_property", has_type_id = false), SimpleType]
...

[Diagnostics, PrintfFormat]
...

While the docs suggest that these are valid attributes:

[AttributeName]

or

[AttributeName(param1 = value1, param2 = value2, ...)]

The docs should be updated to include this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions