mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-14 17:16:01 +00:00
Emit unit tests for parsing and printing. Emit benchmarks for parsing. Uses intrinsics.def as a single-source-of-truth. The generators provide a way to optimize the enum parsers. Change-Id: Ic95177b8b60a51f0bcd6dab4138984f54f30ed6d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97201 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
23 lines
641 B
Cheetah
23 lines
641 B
Cheetah
{{- /*
|
|
--------------------------------------------------------------------------------
|
|
Template file for use with tools/src/cmd/gen to generate builtin_value.cc
|
|
|
|
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 "builtin_value") -}}
|
|
|
|
#include "src/tint/ast/builtin_value.h"
|
|
|
|
namespace tint::ast {
|
|
|
|
{{ Eval "ParseEnum" $enum}}
|
|
|
|
{{ Eval "EnumOStream" $enum}}
|
|
|
|
} // namespace tint::ast
|