Index: src/ast/scopes.h |
diff --git a/src/ast/scopes.h b/src/ast/scopes.h |
index e420cfe053ab4eb616020747c54d23f592715424..8c8a833168792ae3828ee344a5cd723948ec8fb6 100644 |
--- a/src/ast/scopes.h |
+++ b/src/ast/scopes.h |
@@ -490,6 +490,12 @@ class Scope: public ZoneObject { |
// The ModuleDescriptor for this scope; only for module scopes. |
ModuleDescriptor* module() const { return module_descriptor_; } |
+ AstRawString* catch_variable_name() const { |
+ DCHECK(is_catch_scope()); |
+ DCHECK(num_var_or_const() == 1); |
+ return static_cast<AstRawString*>(variables_.Start()->key); |
+ } |
+ |
// --------------------------------------------------------------------------- |
// Variable allocation. |