TheToolsmiths / ddl

Data Definition Language for Game Development Tools
MIT License
4 stars 3 forks source link

Embedded parsing #12

Open flaxed opened 5 years ago

flaxed commented 5 years ago

This isn't a major feature, but might be useful.

It would allow whoever is using our tools to provide a file that doesn't contain exclusively .ddl or even .xdl content to parse the relevant .ddl content.

Let's assume we have a HLSL shader with .ddl content:

## ddl
def struct ShaderInputs {
    [editor("float_color")]
    tint: float3,
}
!##

float3 main() : SV_COLOR
{
    return tint;
}

This would allow for the project pipeline to parse the shader inputs definition, generate all the useful files, including a CBuffer definition that gets injected directly into the file, and .h files with a struct that maps directly to the CBuffer.

Also improves development workflow since the dev only needs to work in a single file.

leiradel commented 5 years ago

I don't see how it's related to DDL. Anyone can do anything they want with it, including embedding it somewhere else, it's their responsibility to extract and parse it.

flaxed commented 5 years ago

It's just a nice feature to have. Obviously not the most important to add. If we can add value for a scenario that is more productive for the user, that ends up being better for the project.

leiradel commented 5 years ago

I think we have different expectations for the scope of the DDL.