/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/languages/typescript/common/js/es6PropertyDeclarator",["require","exports","vs/languages/typescript/common/lib/typescriptServices"],function(e,t,n){var r=function(){function e(){}return Object.defineProperty(e.prototype,"name",{get:function(){return"rewriter.es6.propertyDeclarator"},enumerable:!0,configurable:!0}),e.prototype.computeEdits=function(e){for(var t=e.sourceFile.getFullText(),r=/\bclass\b/g;r.test(t);){var i=n.getTokenAtPosition(e.sourceFile,r.lastIndex-1);!i.parent||204!==i.parent.kind&&177!==i.parent.kind||this._checkForThisAssignments(i.parent,e)}},e.prototype._checkForThisAssignments=function(e,t){for(var r,i=/this/g,s=e.getText();i.test(s);){var o=e.getStart()+i.lastIndex-1,a=n.getTokenAtPosition(e.getSourceFile(),o);if(158===a.parent.kind&&172===a.parent.parent.kind){var c=a.parent.name;r||(r=Object.create(null)),r[c.text]=!0}}if(r){var l=[];for(var u in r)l.push("\n;"),l.push(u);t.newInsert(e.members.end,l.join(""))}},e}();return r});