Skip to content

Add simplified syntax for external blocks #92

@SirLynix

Description

@SirLynix

Allow variable blocks (currently only external blocks) to be declared inline.

[auto_binding]
external
{
   foo: uniform[Buffer]
}

=>

[auto_binding] external foo: uniform[Buffer];

Common attributes should be applied to both the block and the variable:

[binding(0), set(1), tag("MyBuffer"), cond(MyCondition)] external foo: uniform[Buffer];

will be understood as:

[binding(0), set(1), tag("MyBuffer"), cond(MyCondition)]
external
{
    [binding(0), set(1), tag("MyBuffer"]) foo: uniform[Buffer];
}

This is a syntaxic sugar that doesn't need any change to the AST.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions