| -------------------------------------------------------------------------------- |
| Template file for use with tools/src/cmd/gen to generate function.cc |
| To update the generated file, run: |
| * tools/src/cmd/gen for structures used by this template |
| * https://golang.org/pkg/text/template/ for documentation on the template syntax |
| -------------------------------------------------------------------------------- |
| #include "src/tint/builtin/function.h" |
| namespace tint::builtin { |
| Function ParseFunction(const std::string& name) { |
| {{- range Sem.Builtins }} |
| if (name == "{{.Name}}") { |
| return Function::k{{PascalCase .Name}}; |
| const char* str(Function i) { |
| {{- range Sem.Builtins }} |
| case Function::k{{PascalCase .Name}}: |
| utils::StringStream& operator<<(utils::StringStream& out, Function i) { |
| } // namespace tint::builtin |