Index: Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js |
diff --git a/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js b/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js |
index b206ac5df26d45e507d5626023d9ec60518702c1..c1518c2c366ac5be5fd8462873e38ae351e7d7bb 100644 |
--- a/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js |
+++ b/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js |
@@ -143,7 +143,11 @@ FormatterWorker.javaScriptOutline = function(params) |
*/ |
function processToken(tokenValue, tokenType, column, newColumn) |
{ |
- if (isJavaScriptIdentifier(tokenType)) { |
+ if (tokenType === "property" && previousTokenType === "property" && (previousToken === "get" || previousToken === "set")) { |
+ currentFunction = { line: i, column: column, name: previousToken + " " + tokenValue }; |
+ addedFunction = true; |
+ previousIdentifier = null; |
+ } else if (isJavaScriptIdentifier(tokenType)) { |
previousIdentifier = tokenValue; |
if (tokenValue && previousToken === "function") { |
// A named function: "function f...". |