Commit c031c83d authored by neis's avatar neis Committed by Commit bot

[ast] Be more precise in --print-scopes about the function kind.

R=littledan@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2088813002
Cr-Commit-Position: refs/heads/master@{#37281}
parent b35623ca
......@@ -823,7 +823,10 @@ static const char* Header(ScopeType scope_type, FunctionKind function_kind,
case EVAL_SCOPE: return "eval";
// TODO(adamk): Should we print concise method scopes specially?
case FUNCTION_SCOPE:
return IsArrowFunction(function_kind) ? "arrow" : "function";
if (IsGeneratorFunction(function_kind)) return "function*";
if (IsAsyncFunction(function_kind)) return "async function";
if (IsArrowFunction(function_kind)) return "arrow";
return "function";
case MODULE_SCOPE: return "module";
case SCRIPT_SCOPE: return "global";
case CATCH_SCOPE: return "catch";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment