/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/languages/typescript/common/participants/nlsParticipant",["require","exports","vs/nls!vs/languages/typescript/common/participants/nlsParticipant","vs/base/common/severity","vs/base/common/strings","vs/languages/typescript/common/lib/typescriptServices"],function(e,t,n,r,i,a){var o=function(){function e(e,t){this._sourceFile=e,this._model=t}return e.prototype.MarkNotLocalizedStrings=function(e){var t=[];this._markers=e;var n=function(e){e&&t.push(e)};t.push(this._sourceFile);do{var r=t.shift();r&&(this.isNlsLocalizeCall(r)||(this.markDoubleQuoteString(r),a.forEachChild(r,n)))}while(t.length>0)},e.prototype.isNlsLocalizeCall=function(e){if(160===e.kind){var t=e;if(158===t.expression.kind){var n=t.expression;return i.equalsIgnoreCase(a.getTextOfNode(n.expression),"nls")&&i.equalsIgnoreCase(a.getTextOfNode(n.name),"localize")}}return!1},e.prototype.markDoubleQuoteString=function(t){if(8===t.kind&&a.getTextOfNode(t).charCodeAt(0)===e._DoubleQuote){var i=this._model.getRangeFromOffsetAndLength(a.getTokenPosOfNode(t),t.getWidth());this._markers.push({severity:r.Info,message:n.localize("vs_languages_typescript_common_participants_nlsParticipant",0),startLineNumber:i.startLineNumber,startColumn:i.startColumn,endLineNumber:i.endLineNumber,endColumn:i.endColumn})}},e._DoubleQuote='"'.charCodeAt(0),e}(),s=function(){function e(){this._markers=[]}return e.prototype.validate=function(t,n,r){this._markers.length=0;var i=new o(r,t);i.MarkNotLocalizedStrings(this._markers),n.changeOne(e.ID,t.getAssociatedResource(),this._markers)},e.ID="typescript.nlsParticipant",e}();t.WorkerParticipant=s});