mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-01 20:21:23 +00:00
tint: Fix indentation in code templates
41e4d9a34 adjusted the tab indentation from 2 to 4 whitespaces. Apply this to the templates so that regenerating these produce no diffs. Bug: dawn:1339 Change-Id: Ib49e0d72b563558fbe2120d3db5754716eb1a4f6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88663 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
74b8483ba4
commit
507a671e7d
@ -16,28 +16,28 @@ namespace tint::sem {
|
||||
|
||||
BuiltinType ParseBuiltinType(const std::string& name) {
|
||||
{{- range .Sem.Functions }}
|
||||
if (name == "{{.Name}}") {
|
||||
return BuiltinType::k{{Title .Name}};
|
||||
}
|
||||
if (name == "{{.Name}}") {
|
||||
return BuiltinType::k{{Title .Name}};
|
||||
}
|
||||
{{- end }}
|
||||
return BuiltinType::kNone;
|
||||
return BuiltinType::kNone;
|
||||
}
|
||||
|
||||
const char* str(BuiltinType i) {
|
||||
switch (i) {
|
||||
case BuiltinType::kNone:
|
||||
return "<none>";
|
||||
switch (i) {
|
||||
case BuiltinType::kNone:
|
||||
return "<none>";
|
||||
{{- range .Sem.Functions }}
|
||||
case BuiltinType::k{{Title .Name}}:
|
||||
return "{{.Name}}";
|
||||
case BuiltinType::k{{Title .Name}}:
|
||||
return "{{.Name}}";
|
||||
{{- end }}
|
||||
}
|
||||
return "<unknown>";
|
||||
}
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, BuiltinType i) {
|
||||
out << str(i);
|
||||
return out;
|
||||
out << str(i);
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace tint::sem
|
||||
|
@ -18,9 +18,9 @@ namespace tint::sem {
|
||||
|
||||
/// Enumerator of all builtin functions
|
||||
enum class BuiltinType {
|
||||
kNone = -1,
|
||||
kNone = -1,
|
||||
{{- range .Sem.Functions }}
|
||||
k{{Title .Name}},
|
||||
k{{Title .Name}},
|
||||
{{- end }}
|
||||
};
|
||||
|
||||
|
@ -13,15 +13,15 @@ See:
|
||||
namespace tint::sem {
|
||||
|
||||
const char* str(ParameterUsage usage) {
|
||||
switch (usage) {
|
||||
case ParameterUsage::kNone:
|
||||
return "none";
|
||||
switch (usage) {
|
||||
case ParameterUsage::kNone:
|
||||
return "none";
|
||||
{{- range .Sem.UniqueParameterNames }}
|
||||
case ParameterUsage::k{{PascalCase .}}:
|
||||
return "{{.}}";
|
||||
case ParameterUsage::k{{PascalCase .}}:
|
||||
return "{{.}}";
|
||||
{{- end }}
|
||||
}
|
||||
return "<unknown>";
|
||||
}
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
} // namespace tint::sem
|
||||
|
@ -16,9 +16,9 @@ namespace tint::sem {
|
||||
/// ParameterUsage is extra metadata for identifying a parameter based on its
|
||||
/// overload position
|
||||
enum class ParameterUsage {
|
||||
kNone = -1,
|
||||
kNone = -1,
|
||||
{{- range .Sem.UniqueParameterNames }}
|
||||
k{{PascalCase .}},
|
||||
k{{PascalCase .}},
|
||||
{{- end }}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user