/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/languages/css/common/monacoParticipant",["require","exports","vs/languages/css/common/parser/cssParser","vs/languages/css/common/parser/cssNodes","vs/base/common/severity"],function(e,t,n,r,o){var i=function(){function e(e,t){this.markerCollector=e,this.mirrorModel=t}return e.prototype.visitNode=function(e){if(e.type!==r.NodeType.Selector)return!0;for(var t=e,n=t.getChildren(),i=0;i<n.length;i++)if(n[i]instanceof r.SimpleSelector){var s=n[i],a=s.getText();if("."===a.charAt(0)&&(a=a.substr(1)),"#"===a.charAt(0)&&(a=a.substr(1)),-1===a.indexOf("monaco")){var c=this.mirrorModel.getPositionFromOffset(s.offset),u={severity:o.Warning,message:"Global css selector",startLineNumber:c.lineNumber,startColumn:c.column,endLineNumber:c.lineNumber,endColumn:c.column};this.markerCollector.push(u)}}return!0},e}(),s=function(){function e(){}return e.prototype.validate=function(t,r){var o=new n.Parser,s=o.parseStylesheet(t),a=[];s.accept(new i(a,t)),r.changeOne(e.ID,t.getAssociatedResource(),a)},e.ID="vs/languages/css/common/monacoParticipant",e}();t.WorkerParticipant=s});