Convert ScopeStack over to symbols.

This CL converts the ScopeStack to use a Symbol instead of a string as
the accessor.

Change-Id: I2893003bc119c86c4822732ef36c7393e4be1e79
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36580
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair
2021-01-11 15:10:19 +00:00
committed by Commit Bot service account
parent f51d965bef
commit 795b6b5a28
15 changed files with 144 additions and 131 deletions

View File

@@ -39,13 +39,13 @@ namespace tint {
class ValidatorImpl {
public:
/// Constructor
ValidatorImpl();
/// @param module the module to validate
explicit ValidatorImpl(const ast::Module* module);
~ValidatorImpl();
/// Runs the validator
/// @param module the module to validate
/// @returns true if the validation was successful
bool Validate(const ast::Module* module);
bool Validate();
/// @returns the diagnostic messages
const diag::List& diagnostics() const { return diags_; }
@@ -148,6 +148,7 @@ class ValidatorImpl {
const std::vector<ast::type::Type*>& constructed_types);
private:
const ast::Module& module_;
diag::List diags_;
ScopeStack<ast::Variable*> variable_stack_;
ScopeStack<ast::Function*> function_stack_;