mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-15 09:35:57 +00:00
This CL adds an `attribute` enum into intrinsics.def and updates the WGSL parser to use the enum parser and SuggestAlternatives. Bug: tint:1831 Change-Id: I33b3e6bbf092282d9b1f86a1080e69940f55ff68 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121280 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
32 lines
789 B
Cheetah
32 lines
789 B
Cheetah
{{- /*
|
|
--------------------------------------------------------------------------------
|
|
Template file for use with tools/src/cmd/gen to generate attribute_test.cc
|
|
|
|
To update the generated file, run:
|
|
./tools/run gen
|
|
|
|
See:
|
|
* tools/src/cmd/gen for structures used by this template
|
|
* https://golang.org/pkg/text/template/ for documentation on the template syntax
|
|
--------------------------------------------------------------------------------
|
|
*/ -}}
|
|
|
|
{{- Import "src/tint/templates/enums.tmpl.inc" -}}
|
|
{{- $enum := (Sem.Enum "attribute") -}}
|
|
|
|
#include "src/tint/builtin/attribute.h"
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <string>
|
|
|
|
#include "src/tint/utils/string.h"
|
|
|
|
namespace tint::builtin {
|
|
namespace {
|
|
|
|
{{ Eval "TestParsePrintEnum" $enum}}
|
|
|
|
} // namespace
|
|
} // namespace tint::builtin
|