Skip to content

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

Notifications You must be signed in to change notification settings

joeycarpinelli/tree-sitter-metal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •