ast: Keep style consistent

Methods and functions are `CamelCase()`
Public fields are `snake_case` with no trailing `_`
Private fields are `snake_case` with a trailing `_`

Remove pointless getters on fully immutable fields.
They provide no value, and just add `()` noise on use.

Remove unused methods.

Bug: tint:1231
Change-Id: If32efd039df48938efd5bc2186d51fe4853e9840
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66600
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton
2021-10-15 17:33:10 +00:00
committed by Tint LUCI CQ
parent b3e6c0d62c
commit 4f3ff57c28
337 changed files with 4287 additions and 4803 deletions

View File

@@ -34,11 +34,11 @@ TEST_F(ScopeStackTest, Global) {
TEST_F(ScopeStackTest, Global_SetWithPointer) {
auto* v = Var("my_var", ty.f32(), ast::StorageClass::kNone);
ScopeStack<ast::Variable*> s;
s.set_global(v->symbol(), v);
s.set_global(v->symbol, v);
ast::Variable* v2 = nullptr;
EXPECT_TRUE(s.get(v->symbol(), &v2));
EXPECT_EQ(v2->symbol(), v->symbol());
EXPECT_TRUE(s.get(v->symbol, &v2));
EXPECT_EQ(v2->symbol, v->symbol);
}
TEST_F(ScopeStackTest, Global_CanNotPop) {