Skip to content

About

A Tree Sitter Grammar for Apple's Metal Shading Language.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

tree-sitter-metal

CI

An experimental Tree Sitter Grammar for Apple's Metal Shading Language.

Note

This project is not affiliated with Apple!

Overview

Apple's Metal Shading Language allows developers to execute programs (kernels) --- and control the execution --- on Apple Silicon GPU hardware. The language is an extension of C++, with features such as exceptions removed, and several type specifiers and attributes added to control execution flows. Metal's specifics are described in a formal specification.

Tree Sitter grammars require very little code logic; grammars are largely code as data in the form of a grammar.js file. This is where generative text models shine. The repository was generated with the Tree Sitter CLI, and the content for the Metal grammar was generated with Claude models in the Zed editor.

Please file an issue to report missing or incorrect grammar content, or any other unexpected behaviors.

About

A Tree Sitter Grammar for Apple's Metal Shading Language.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages