Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- Added test and fix for comment bug

  • Loading branch information...
commit 03f6b8fa2af1a906596f33abb82618e5639083e3 1 parent 6bcc12e
authored January 09, 2011
692  src/dotless.Core/Parser/Tokenizer.cs
... ...
@@ -1,347 +1,347 @@
1  
-namespace dotless.Core.Parser
2  
-{
3  
-    using System.Collections.Generic;
4  
-    using System.Linq;
5  
-    using System.Text;
6  
-    using System.Text.RegularExpressions;
7  
-    using Exceptions;
8  
-    using Infrastructure.Nodes;
9  
-    using Utils;
10  
-
11  
-    public class Tokenizer
12  
-    {
13  
-        public int Optimization { get; set; }
14  
-
15  
-        private string _input; // LeSS input string
16  
-        private List<string> _chunks; // chunkified input
17  
-        private int _i; // current index in `input`
18  
-        private int _j; // current chunk
19  
-        private int _current; // index of current chunk, in `input`
20  
-        private int _inputLength;
21  
-
22  
-        //Increasing throughput through tracing of Regex
23  
-        private IDictionary<string, Regex> regexCache = new Dictionary<string, Regex>();
24  
-
25  
-        public Tokenizer(int optimization)
26  
-        {
27  
-            Optimization = optimization;
28  
-        }
29  
-
30  
-        public void SetupInput(string input)
31  
-        {
32  
-            _i = _j = _current = 0;
33  
-            _chunks = new List<string>();
34  
-            _input = input.Replace("\r\n", "\n");
35  
-            _inputLength = _input.Length;
36  
-
37  
-            // Split the input into chunks,
38  
-            // Either delimited by /\n\n/ or
39  
-            // delmited by '\n}' (see rationale above),
40  
-            // depending on the level of optimization.
41  
-
42  
-            if (Optimization == 0)
43  
-                _chunks.Add(_input);
44  
-            else
45  
-            {
46  
-                var chunkParts = new List<StringBuilder> { new StringBuilder() };
47  
-                var chunkPart = chunkParts.Last();
48  
-                var skip = new Regex(@"\G[^\""'{}/\\]+");
49  
-                var comment = new Regex(@"\G\/\*(?:[^*\n]|\*+[^\/\n]|\*?(\n))*\*+\/");
50  
-                var level = 0;
51  
-                var lastBlock = 0;
52  
-                var lastQuote = 0;
53  
-                char? inString = null;
54  
-
55  
-                for (int i = 0; i < _inputLength; i++)
56  
-                {
57  
-                    var match = skip.Match(_input, i);
58  
-                    if(match.Success)
59  
-                    {
60  
-                        chunkPart.Append(match.Value);
61  
-                        i += match.Length;
62  
-
63  
-                        if (i == _inputLength)
64  
-                            break;
65  
-                    }
66  
-
67  
-
68  
-                    if(i < _inputLength - 1 && _input[i] == '/')
69  
-                    {
70  
-                        var cc = _input[i + 1];
71  
-                        if(cc == '/' || cc=='*')
72  
-                        {
73  
-                            match = comment.Match(_input, i);
74  
-                            if (match.Success)
75  
-                            {
76  
-                                i += match.Length;
77  
-                                chunkPart.Append(match.Value);
78  
-
79  
-                                if (i == _inputLength)
80  
-                                    break;
81  
-                            }
82  
-                        }
83  
-                    }
84  
-
85  
-                    var c = _input[i];
86  
-
87  
-                    if (c == '"' || c == '\'')
88  
-                    {
89  
-                        if (inString == null)
90  
-                        {
91  
-                            inString = c;
92  
-                            lastQuote = i;
93  
-                        }
94  
-                        else
95  
-                            inString = inString == c ? null : inString;
96  
-                    }
97  
-                    else if (inString != null && c == '\\' && i < _inputLength - 1)
98  
-                    {
99  
-                        chunkPart.Append(_input, i, 2);
100  
-                        i++;
101  
-                        continue;
102  
-                    }
103  
-                    else if (inString == null && c == '{')
104  
-                    {
105  
-                        level++;
106  
-                        lastBlock = i;
107  
-                    }
108  
-                    else if (inString == null && c == '}')
109  
-                    {
110  
-                        level--;
111  
-
112  
-                        if (level < 0)
113  
-                            throw new ParsingException("Unexpected '}'", i);
114  
-
115  
-                        chunkPart.Append(c);
116  
-                        chunkPart = new StringBuilder();
117  
-                        chunkParts.Add(chunkPart);
118  
-                        continue;
119  
-                    }
120  
-
121  
-                    chunkPart.Append(c);
122  
-                }
123  
-
124  
-                if(inString != null)
125  
-                    throw new ParsingException(string.Format("Missing closing quote ({0})", inString), lastQuote);
126  
-
127  
-                if(level > 0)
128  
-                    throw new ParsingException("Missing closing '}'", lastBlock);
129  
-
130  
-                _chunks = chunkParts.Select(p => p.ToString()).ToList();
131  
-
132  
-                _input = _chunks.JoinStrings("");
133  
-
134  
-                _inputLength = _input.Length;
135  
-            }
136  
-
137  
-            Advance(0); // skip any whitespace characters at the start.
138  
-        }
139  
-
140  
-
141  
-        public string MatchString(char tok)
142  
-        {
143  
-            var c = Match(tok);
144  
-
145  
-            return c == null ? null : c.Value;
146  
-        }
147  
-
148  
-        public string MatchString(string tok)
149  
-        {
150  
-            var match = Match(tok);
151  
-
152  
-            return match == null ? null : match.Value;
153  
-        }
154  
-
155  
-        //
156  
-        // Parse from a token, regexp or string, and move forward if match
157  
-        //
158  
-
159  
-        public CharMatchResult Match(char tok)
160  
-        {
161  
-            if (_i == _inputLength)
162  
-                return null;
163  
-
164  
-            if (_input[_i] == tok)
165  
-            {
166  
-                Advance(1);
167  
-
168  
-                return new CharMatchResult(tok);
169  
-            }
170  
-
171  
-            return null;
172  
-        }
173  
-
174  
-
175  
-        public RegexMatchResult Match(string tok)
176  
-        {
177  
-            return Match(tok, false);
178  
-        }
179  
-
180  
-        public RegexMatchResult Match(string tok, bool caseInsensitive)
181  
-        {
182  
-            var options = RegexOptions.None;
183  
-            if (caseInsensitive)
184  
-                options |= RegexOptions.IgnoreCase;
185  
-
186  
-            var regex = GetRegex(tok, options);
187  
-
188  
-            var match = regex.Match(_chunks[_j], _i - _current);
189  
-
190  
-            if (!match.Success)
191  
-                return null;
192  
-
193  
-            Advance(match.Length);
194  
-
195  
-            return new RegexMatchResult(match);
196  
-        }
197  
-
198  
-        public void Advance(int length)
199  
-        {
200  
-            // The match is confirmed, add the match length to `i`,
201  
-            // and consume any extra white-space characters (' ' || '\n')
202  
-            // which come after that. The reason for this is that LeSS's
203  
-            // grammar is mostly white-space insensitive.
204  
-            _i += length;
205  
-            var endIndex = _current + _chunks[_j].Length;
206  
-
207  
-            while (true)
208  
-            {
209  
-                if(_i == _inputLength)
210  
-                    break;
211  
-
212  
-                if (_i == endIndex)
213  
-                {
214  
-                    if (_j < _chunks.Count - 1)
215  
-                    {
216  
-                        _current = endIndex;
217  
-                        endIndex += _chunks[++_j].Length;
218  
-                    }
219  
-                    else
220  
-                        break;
221  
-                }
222  
-
223  
-                if (!char.IsWhiteSpace(_input[_i]))
224  
-                    break;
225  
-
226  
-                _i++;
227  
-            }
228  
-        }
229  
-
230  
-        // Same as Match, but don't change the state of the parser,
231  
-        // just return the match.
232  
-
233  
-        public bool Peek(char tok)
234  
-        {
235  
-            if (_i == _inputLength)
236  
-                return false;
237  
-
238  
-            return _input[_i] == tok;
239  
-        }
240  
-
241  
-        public bool Peek(string tok)
242  
-        {
243  
-            var regex = GetRegex(tok, RegexOptions.None);
244  
-
245  
-            var match = regex.Match(_input, _i);
246  
-
247  
-            return match.Success;
248  
-        }
249  
-
250  
-        private Regex GetRegex(string pattern, RegexOptions options)
251  
-        {
252  
-            if (!regexCache.ContainsKey(pattern))
253  
-                regexCache.Add(pattern, new Regex(@"\G" + pattern, options));
254  
-
255  
-            return regexCache[pattern];
256  
-        }
257  
-
258  
-        public char PreviousChar
259  
-        {
260  
-            get { return _i == 0 ? '\0' : _input[_i - 1]; }
261  
-        }
262  
-
263  
-        public char CurrentChar
264  
-        {
265  
-            get { return _i == _inputLength ? '\0' : _input[_i]; }
266  
-        }
267  
-
268  
-        public bool HasCompletedParsing()
269  
-        {
270  
-            return _i == _inputLength;
271  
-        }
272  
-
273  
-        public Location Location
274  
-        {
275  
-            get 
276  
-            {
277  
-                return new Location
278  
-                {
279  
-                    Index = _i,
280  
-                    CurrentChunk = _j,
281  
-                    CurrentChunkIndex = _current
282  
-                };
283  
-            }
284  
-            set
285  
-            {
286  
-                _i = value.Index;
287  
-                _j = value.CurrentChunk;
288  
-                _current = value.CurrentChunkIndex;
289  
-            }
290  
-        }
291  
-
292  
-        public Zone GetZone(string error, int position, int call, string fileName)
293  
-        {
294  
-            var first = _input.Substring(0, System.Math.Min(position, _input.Length));
295  
-
296  
-            var start = first.LastIndexOf('\n') + 1;
297  
-            var line = first.Count(c => c == '\n');
298  
-
299  
-            var lines = _input.Split('\n');
300  
-
301  
-            var callLine = _input.Substring(0, call).Count(c => c == '\n');
302  
-
303  
-            return new Zone
304  
-                       {
305  
-                           FileName = fileName,
306  
-                           Message = error,
307  
-                           CallLine = callLine + 1,
308  
-                           CallExtract = callLine <= 0 ? null : new Extract(lines, callLine),
309  
-                           LineNumber = line + 1,
310  
-                           Position = position - start,
311  
-                           Extract = new Extract(lines, line),
312  
-                       };
313  
-        }
314  
-    }
315  
-
316  
-    public class Zone
317  
-    {
318  
-        public int LineNumber { get; set; }
319  
-        public int Position { get; set; }
320  
-        public Extract Extract { get; set; }
321  
-        public string Message { get; set; }
322  
-        public string FileName { get; set; }
323  
-        public int CallLine { get; set; }
324  
-        public Extract CallExtract { get; set; }
325  
-    }
326  
-
327  
-    public class Extract
328  
-    {
329  
-        public Extract(string[] lines, int line)
330  
-        {
331  
-            Before = line > 0 ? lines[line - 1] : "/beginning of file";
332  
-            Line = lines[line];
333  
-            After = line + 1 < lines.Length ? lines[line + 1] : "/end of file";
334  
-        }
335  
-
336  
-        public string After { get; set; }
337  
-        public string Before { get; set; }
338  
-        public string Line { get; set; }
339  
-    }
340  
-
341  
-    public class Location 
342  
-    {
343  
-        public int Index { get; set; }
344  
-        public int CurrentChunk { get; set; }
345  
-        public int CurrentChunkIndex { get; set; }
346  
-    }
  1
+namespace dotless.Core.Parser
  2
+{
  3
+    using System.Collections.Generic;
  4
+    using System.Linq;
  5
+    using System.Text;
  6
+    using System.Text.RegularExpressions;
  7
+    using Exceptions;
  8
+    using Infrastructure.Nodes;
  9
+    using Utils;
  10
+
  11
+    public class Tokenizer
  12
+    {
  13
+        public int Optimization { get; set; }
  14
+
  15
+        private string _input; // LeSS input string
  16
+        private List<string> _chunks; // chunkified input
  17
+        private int _i; // current index in `input`
  18
+        private int _j; // current chunk
  19
+        private int _current; // index of current chunk, in `input`
  20
+        private int _inputLength;
  21
+
  22
+        //Increasing throughput through tracing of Regex
  23
+        private IDictionary<string, Regex> regexCache = new Dictionary<string, Regex>();
  24
+
  25
+        public Tokenizer(int optimization)
  26
+        {
  27
+            Optimization = optimization;
  28
+        }
  29
+
  30
+        public void SetupInput(string input)
  31
+        {
  32
+            _i = _j = _current = 0;
  33
+            _chunks = new List<string>();
  34
+            _input = input.Replace("\r\n", "\n");
  35
+            _inputLength = _input.Length;
  36
+
  37
+            // Split the input into chunks,
  38
+            // Either delimited by /\n\n/ or
  39
+            // delmited by '\n}' (see rationale above),
  40
+            // depending on the level of optimization.
  41
+
  42
+            if (Optimization == 0)
  43
+                _chunks.Add(_input);
  44
+            else
  45
+            {
  46
+                var chunkParts = new List<StringBuilder> { new StringBuilder() };
  47
+                var chunkPart = chunkParts.Last();
  48
+                var skip = new Regex(@"\G[^\""'{}/\\]+");
  49
+                var comment = new Regex(@"\G\/\*(?:[^*\n]|\*+[^\/\n]|\*?(\n))*?\*+\/");
  50
+                var level = 0;
  51
+                var lastBlock = 0;
  52
+                var lastQuote = 0;
  53
+                char? inString = null;
  54
+
  55
+                for (int i = 0; i < _inputLength; i++)
  56
+                {
  57
+                    var match = skip.Match(_input, i);
  58
+                    if(match.Success)
  59
+                    {
  60
+                        chunkPart.Append(match.Value);
  61
+                        i += match.Length;
  62
+
  63
+                        if (i == _inputLength)
  64
+                            break;
  65
+                    }
  66
+
  67
+
  68
+                    if(i < _inputLength - 1 && _input[i] == '/')
  69
+                    {
  70
+                        var cc = _input[i + 1];
  71
+                        if(cc == '/' || cc=='*')
  72
+                        {
  73
+                            match = comment.Match(_input, i);
  74
+                            if (match.Success)
  75
+                            {
  76
+                                i += match.Length;
  77
+                                chunkPart.Append(match.Value);
  78
+
  79
+                                if (i == _inputLength)
  80
+                                    break;
  81
+                            }
  82
+                        }
  83
+                    }
  84
+
  85
+                    var c = _input[i];
  86
+
  87
+                    if (c == '"' || c == '\'')
  88
+                    {
  89
+                        if (inString == null)
  90
+                        {
  91
+                            inString = c;
  92
+                            lastQuote = i;
  93
+                        }
  94
+                        else
  95
+                            inString = inString == c ? null : inString;
  96
+                    }
  97
+                    else if (inString != null && c == '\\' && i < _inputLength - 1)
  98
+                    {
  99
+                        chunkPart.Append(_input, i, 2);
  100
+                        i++;
  101
+                        continue;
  102
+                    }
  103
+                    else if (inString == null && c == '{')
  104
+                    {
  105
+                        level++;
  106
+                        lastBlock = i;
  107
+                    }
  108
+                    else if (inString == null && c == '}')
  109
+                    {
  110
+                        level--;
  111
+
  112
+                        if (level < 0)
  113
+                            throw new ParsingException("Unexpected '}'", i);
  114
+
  115
+                        chunkPart.Append(c);
  116
+                        chunkPart = new StringBuilder();
  117
+                        chunkParts.Add(chunkPart);
  118
+                        continue;
  119
+                    }
  120
+
  121
+                    chunkPart.Append(c);
  122
+                }
  123
+
  124
+                if(inString != null)
  125
+                    throw new ParsingException(string.Format("Missing closing quote ({0})", inString), lastQuote);
  126
+
  127
+                if(level > 0)
  128
+                    throw new ParsingException("Missing closing '}'", lastBlock);
  129
+
  130
+                _chunks = chunkParts.Select(p => p.ToString()).ToList();
  131
+
  132
+                _input = _chunks.JoinStrings("");
  133
+
  134
+                _inputLength = _input.Length;
  135
+            }
  136
+
  137
+            Advance(0); // skip any whitespace characters at the start.
  138
+        }
  139
+
  140
+
  141
+        public string MatchString(char tok)
  142
+        {
  143
+            var c = Match(tok);
  144
+
  145
+            return c == null ? null : c.Value;
  146
+        }
  147
+
  148
+        public string MatchString(string tok)
  149
+        {
  150
+            var match = Match(tok);
  151
+
  152
+            return match == null ? null : match.Value;
  153
+        }
  154
+
  155
+        //
  156
+        // Parse from a token, regexp or string, and move forward if match
  157
+        //
  158
+
  159
+        public CharMatchResult Match(char tok)
  160
+        {
  161
+            if (_i == _inputLength)
  162
+                return null;
  163
+
  164
+            if (_input[_i] == tok)
  165
+            {
  166
+                Advance(1);
  167
+
  168
+                return new CharMatchResult(tok);
  169
+            }
  170
+
  171
+            return null;
  172
+        }
  173
+
  174
+
  175
+        public RegexMatchResult Match(string tok)
  176
+        {
  177
+            return Match(tok, false);
  178
+        }
  179
+
  180
+        public RegexMatchResult Match(string tok, bool caseInsensitive)
  181
+        {
  182
+            var options = RegexOptions.None;
  183
+            if (caseInsensitive)
  184
+                options |= RegexOptions.IgnoreCase;
  185
+
  186
+            var regex = GetRegex(tok, options);
  187
+
  188
+            var match = regex.Match(_chunks[_j], _i - _current);
  189
+
  190
+            if (!match.Success)
  191
+                return null;
  192
+
  193
+            Advance(match.Length);
  194
+
  195
+            return new RegexMatchResult(match);
  196
+        }
  197
+
  198
+        public void Advance(int length)
  199
+        {
  200
+            // The match is confirmed, add the match length to `i`,
  201
+            // and consume any extra white-space characters (' ' || '\n')
  202
+            // which come after that. The reason for this is that LeSS's
  203
+            // grammar is mostly white-space insensitive.
  204
+            _i += length;
  205
+            var endIndex = _current + _chunks[_j].Length;
  206
+
  207
+            while (true)
  208
+            {
  209
+                if(_i == _inputLength)
  210
+                    break;
  211
+
  212
+                if (_i == endIndex)
  213
+                {
  214
+                    if (_j < _chunks.Count - 1)
  215
+                    {
  216
+                        _current = endIndex;
  217
+                        endIndex += _chunks[++_j].Length;
  218
+                    }
  219
+                    else
  220
+                        break;
  221
+                }
  222
+
  223
+                if (!char.IsWhiteSpace(_input[_i]))
  224
+                    break;
  225
+
  226
+                _i++;
  227
+            }
  228
+        }
  229
+
  230
+        // Same as Match, but don't change the state of the parser,
  231
+        // just return the match.
  232
+
  233
+        public bool Peek(char tok)
  234
+        {
  235
+            if (_i == _inputLength)
  236
+                return false;
  237
+
  238
+            return _input[_i] == tok;
  239
+        }
  240
+
  241
+        public bool Peek(string tok)
  242
+        {
  243
+            var regex = GetRegex(tok, RegexOptions.None);
  244
+
  245
+            var match = regex.Match(_input, _i);
  246
+
  247
+            return match.Success;
  248
+        }
  249
+
  250
+        private Regex GetRegex(string pattern, RegexOptions options)
  251
+        {
  252
+            if (!regexCache.ContainsKey(pattern))
  253
+                regexCache.Add(pattern, new Regex(@"\G" + pattern, options));
  254
+
  255
+            return regexCache[pattern];
  256
+        }
  257
+
  258
+        public char PreviousChar
  259
+        {
  260
+            get { return _i == 0 ? '\0' : _input[_i - 1]; }
  261
+        }
  262
+
  263
+        public char CurrentChar
  264
+        {
  265
+            get { return _i == _inputLength ? '\0' : _input[_i]; }
  266
+        }
  267
+
  268
+        public bool HasCompletedParsing()
  269
+        {
  270
+            return _i == _inputLength;
  271
+        }
  272
+
  273
+        public Location Location
  274
+        {
  275
+            get 
  276
+            {
  277
+                return new Location
  278
+                {
  279
+                    Index = _i,
  280
+                    CurrentChunk = _j,
  281
+                    CurrentChunkIndex = _current
  282
+                };
  283
+            }
  284
+            set
  285
+            {
  286
+                _i = value.Index;
  287
+                _j = value.CurrentChunk;
  288
+                _current = value.CurrentChunkIndex;
  289
+            }
  290
+        }
  291
+
  292
+        public Zone GetZone(string error, int position, int call, string fileName)
  293
+        {
  294
+            var first = _input.Substring(0, System.Math.Min(position, _input.Length));
  295
+
  296
+            var start = first.LastIndexOf('\n') + 1;
  297
+            var line = first.Count(c => c == '\n');
  298
+
  299
+            var lines = _input.Split('\n');
  300
+
  301
+            var callLine = _input.Substring(0, call).Count(c => c == '\n');
  302
+
  303
+            return new Zone
  304
+                       {
  305
+                           FileName = fileName,
  306
+                           Message = error,
  307
+                           CallLine = callLine + 1,
  308
+                           CallExtract = callLine <= 0 ? null : new Extract(lines, callLine),
  309
+                           LineNumber = line + 1,
  310
+                           Position = position - start,
  311
+                           Extract = new Extract(lines, line),
  312
+                       };
  313
+        }
  314
+    }
  315
+
  316
+    public class Zone
  317
+    {
  318
+        public int LineNumber { get; set; }
  319
+        public int Position { get; set; }
  320
+        public Extract Extract { get; set; }
  321
+        public string Message { get; set; }
  322
+        public string FileName { get; set; }
  323
+        public int CallLine { get; set; }
  324
+        public Extract CallExtract { get; set; }
  325
+    }
  326
+
  327
+    public class Extract
  328
+    {
  329
+        public Extract(string[] lines, int line)
  330
+        {
  331
+            Before = line > 0 ? lines[line - 1] : "/beginning of file";
  332
+            Line = lines[line];
  333
+            After = line + 1 < lines.Length ? lines[line + 1] : "/end of file";
  334
+        }
  335
+
  336
+        public string After { get; set; }
  337
+        public string Before { get; set; }
  338
+        public string Line { get; set; }
  339
+    }
  340
+
  341
+    public class Location 
  342
+    {
  343
+        public int Index { get; set; }
  344
+        public int CurrentChunk { get; set; }
  345
+        public int CurrentChunkIndex { get; set; }
  346
+    }
347 347
 }
29  src/dotless.Test/Unit/Engine/CommentBug.cs
... ...
@@ -0,0 +1,29 @@
  1
+namespace dotless.Test.Unit.Engine
  2
+{
  3
+    using NUnit.Framework;
  4
+
  5
+    public class CommentBug : SpecFixtureBase
  6
+    {
  7
+        
  8
+        [Test]
  9
+        public void Block_comment_with_multiple_asterisks_before_closing_slash_does_not_cause_tokenizer_error()
  10
+        {
  11
+        	var input =
  12
+        		@"@xxx: yellow; 
  13
+/* Block comment ********************/ 
  14
+body 
  15
+{ 
  16
+    background-color: @xxx; 
  17
+    /* Another block comment */ 
  18
+}";
  19
+
  20
+        	var expected =
  21
+        		@"/* Block comment ********************/body {
  22
+  background-color: yellow;
  23
+  /* Another block comment */
  24
+}";
  25
+
  26
+            AssertLess(input, expected);
  27
+        }
  28
+    }
  29
+}
347  src/dotless.Test/dotless.Test.csproj
... ...
@@ -1,174 +1,175 @@
1  
-<?xml version="1.0" encoding="utf-8"?>
2  
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3  
-  <PropertyGroup>
4  
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5  
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6  
-    <ProductVersion>9.0.30729</ProductVersion>
7  
-    <SchemaVersion>2.0</SchemaVersion>
8  
-    <ProjectGuid>{E18BD1BD-68E2-4D7F-B6D6-C100BDDE27E8}</ProjectGuid>
9  
-    <OutputType>Library</OutputType>
10  
-    <AppDesignerFolder>Properties</AppDesignerFolder>
11  
-    <RootNamespace>dotless.Test</RootNamespace>
12  
-    <AssemblyName>dotless.Test</AssemblyName>
13  
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14  
-    <FileAlignment>512</FileAlignment>
15  
-    <FileUpgradeFlags>
16  
-    </FileUpgradeFlags>
17  
-    <OldToolsVersion>3.5</OldToolsVersion>
18  
-    <UpgradeBackupLocation />
19  
-    <PublishUrl>publish\</PublishUrl>
20  
-    <Install>true</Install>
21  
-    <InstallFrom>Disk</InstallFrom>
22  
-    <UpdateEnabled>false</UpdateEnabled>
23  
-    <UpdateMode>Foreground</UpdateMode>
24  
-    <UpdateInterval>7</UpdateInterval>
25  
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
26  
-    <UpdatePeriodically>false</UpdatePeriodically>
27  
-    <UpdateRequired>false</UpdateRequired>
28  
-    <MapFileExtensions>true</MapFileExtensions>
29  
-    <ApplicationRevision>0</ApplicationRevision>
30  
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
31  
-    <IsWebBootstrapper>false</IsWebBootstrapper>
32  
-    <UseApplicationTrust>false</UseApplicationTrust>
33  
-    <BootstrapperEnabled>true</BootstrapperEnabled>
34  
-  </PropertyGroup>
35  
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
36  
-    <DebugSymbols>true</DebugSymbols>
37  
-    <DebugType>full</DebugType>
38  
-    <Optimize>false</Optimize>
39  
-    <OutputPath>bin\Debug\</OutputPath>
40  
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
41  
-    <ErrorReport>prompt</ErrorReport>
42  
-    <WarningLevel>4</WarningLevel>
43  
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
44  
-  </PropertyGroup>
45  
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
46  
-    <DebugType>pdbonly</DebugType>
47  
-    <Optimize>true</Optimize>
48  
-    <OutputPath>bin\Release\</OutputPath>
49  
-    <DefineConstants>TRACE</DefineConstants>
50  
-    <ErrorReport>prompt</ErrorReport>
51  
-    <WarningLevel>4</WarningLevel>
52  
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
53  
-  </PropertyGroup>
54  
-  <ItemGroup>
55  
-    <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
56  
-      <SpecificVersion>False</SpecificVersion>
57  
-      <HintPath>..\..\lib\Pandora\Microsoft.Practices.ServiceLocation.dll</HintPath>
58  
-    </Reference>
59  
-    <Reference Include="Moq, Version=4.0.10531.7, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
60  
-      <SpecificVersion>False</SpecificVersion>
61  
-      <HintPath>..\..\lib\Moq\Moq.dll</HintPath>
62  
-    </Reference>
63  
-    <Reference Include="nunit.framework, Version=2.5.1.9189, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
64  
-      <SpecificVersion>False</SpecificVersion>
65  
-      <HintPath>..\..\lib\NUnit\nunit.framework.dll</HintPath>
66  
-    </Reference>
67  
-    <Reference Include="System" />
68  
-    <Reference Include="System.Core">
69  
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
70  
-    </Reference>
71  
-    <Reference Include="System.Web" />
72  
-    <Reference Include="System.Web.Abstractions">
73  
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
74  
-    </Reference>
75  
-    <Reference Include="System.Xml.Linq">
76  
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
77  
-    </Reference>
78  
-    <Reference Include="System.Data.DataSetExtensions">
79  
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
80  
-    </Reference>
81  
-    <Reference Include="System.Data" />
82  
-    <Reference Include="System.Xml" />
83  
-  </ItemGroup>
84  
-  <ItemGroup>
85  
-    <Compile Include="Specs\Compression\ColorsFixture.cs" />
86  
-    <Compile Include="Specs\Compression\CommentsFixture.cs" />
87  
-    <Compile Include="CompressedSpecFixtureBase.cs" />
88  
-    <Compile Include="Specs\Compression\ImportFixture.cs" />
89  
-    <Compile Include="Specs\Compression\SelectorsFixture.cs" />
90  
-    <Compile Include="Specs\Compression\WhitespaceFixture.cs" />
91  
-    <Compile Include="Specs\ScriptFixture.cs" />
92  
-    <Compile Include="TestStylizer.cs" />
93  
-    <Compile Include="Unit\Engine\CacheDecoratorFixture.cs" />
94  
-    <Compile Include="Unit\Engine\NullVariableValueBug.cs" />
95  
-    <Compile Include="Unit\Engine\ParameterDecoratorFixture.cs" />
96  
-    <Compile Include="Unit\Engine\PathAggregatorBug.cs" />
97  
-    <Compile Include="Unit\Parameters\ParameterSourceFixture.cs" />
98  
-    <Compile Include="Unit\Response\CachedCssResponseFixture.cs" />
99  
-    <Compile Include="Specs\OptimizationsFixture.cs" />
100  
-    <Compile Include="SpecFixtureBase.cs" />
101  
-    <Compile Include="Specs\CommentsFixture.cs" />
102  
-    <Compile Include="Specs\ColorsFixture.cs" />
103  
-    <Compile Include="Specs\AccessorsFixture.cs" />
104  
-    <Compile Include="DictionaryReader.cs" />
105  
-    <Compile Include="Specs\Functions\AbsFixture.cs" />
106  
-    <Compile Include="Specs\Functions\AlphaFixture.cs" />
107  
-    <Compile Include="Specs\Functions\BlueFixture.cs" />
108  
-    <Compile Include="Specs\Functions\CielFixture.cs" />
109  
-    <Compile Include="Specs\Functions\ComplementFixture.cs" />
110  
-    <Compile Include="Specs\Functions\FloorFixture.cs" />
111  
-    <Compile Include="Specs\Functions\FormatStringFixture.cs" />
112  
-    <Compile Include="Specs\Functions\GrayscaleFixture.cs" />
113  
-    <Compile Include="Specs\Functions\GreenFixture.cs" />
114  
-    <Compile Include="Specs\Functions\HslaFixture.cs" />
115  
-    <Compile Include="Specs\Functions\HslFixture.cs" />
116  
-    <Compile Include="Specs\Functions\HueFixture.cs" />
117  
-    <Compile Include="Specs\Functions\LightnessFixture.cs" />
118  
-    <Compile Include="Specs\Functions\MixFixture.cs" />
119  
-    <Compile Include="Specs\Functions\PercentageFixture.cs" />
120  
-    <Compile Include="Specs\Functions\RedFixture.cs" />
121  
-    <Compile Include="Specs\Functions\RgbaFixture.cs" />
122  
-    <Compile Include="Specs\Functions\RgbFixture.cs" />
123  
-    <Compile Include="Specs\Functions\RoundFixture.cs" />
124  
-    <Compile Include="Specs\Functions\SaturationFixture.cs" />
125  
-    <Compile Include="Specs\ImportFixture.cs" />
126  
-    <Compile Include="Specs\MixinsArgsFixture.cs" />
127  
-    <Compile Include="Specs\ScopeFixture.cs" />
128  
-    <Compile Include="Specs\MixinsFixture.cs" />
129  
-    <Compile Include="Specs\ParensFixture.cs" />
130  
-    <Compile Include="Specs\OperationsFixture.cs" />
131  
-    <Compile Include="Specs\VariablesFixture.cs" />
132  
-    <Compile Include="Specs\SelectorsFixture.cs" />
133  
-    <Compile Include="Specs\Css3Fixture.cs" />
134  
-    <Compile Include="Specs\CssFixture.cs" />
135  
-    <Compile Include="Specs\StringsFixture.cs" />
136  
-    <Compile Include="Specs\RulesetsFixture.cs" />
137  
-    <Compile Include="Specs\WhitespaceFixture.cs" />
138  
-    <Compile Include="Properties\AssemblyInfo.cs" />
139  
-    <Compile Include="Config\ConfigurationFixture.cs" />
140  
-    <Compile Include="Unit\Response\CssResponceFixture.cs" />
141  
-    <Compile Include="HttpFixtureBase.cs" />
142  
-  </ItemGroup>
143  
-  <ItemGroup>
144  
-    <ProjectReference Include="..\dotless.Core\dotless.Core.csproj">
145  
-      <Project>{D7A24E58-68D0-4B10-A324-EA33C822FA56}</Project>
146  
-      <Name>dotless.Core</Name>
147  
-    </ProjectReference>
148  
-  </ItemGroup>
149  
-  <ItemGroup>
150  
-    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
151  
-      <Visible>False</Visible>
152  
-      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
153  
-      <Install>false</Install>
154  
-    </BootstrapperPackage>
155  
-    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
156  
-      <Visible>False</Visible>
157  
-      <ProductName>.NET Framework 3.5 SP1</ProductName>
158  
-      <Install>true</Install>
159  
-    </BootstrapperPackage>
160  
-    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
161  
-      <Visible>False</Visible>
162  
-      <ProductName>Windows Installer 3.1</ProductName>
163  
-      <Install>true</Install>
164  
-    </BootstrapperPackage>
165  
-  </ItemGroup>
166  
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
167  
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
168  
-       Other similar extension points exist, see Microsoft.Common.targets.
169  
-  <Target Name="BeforeBuild">
170  
-  </Target>
171  
-  <Target Name="AfterBuild">
172  
-  </Target>
173  
-  -->
  1
+<?xml version="1.0" encoding="utf-8"?>
  2
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3
+  <PropertyGroup>
  4
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
  5
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  6
+    <ProductVersion>9.0.30729</ProductVersion>
  7
+    <SchemaVersion>2.0</SchemaVersion>
  8
+    <ProjectGuid>{E18BD1BD-68E2-4D7F-B6D6-C100BDDE27E8}</ProjectGuid>
  9
+    <OutputType>Library</OutputType>
  10
+    <AppDesignerFolder>Properties</AppDesignerFolder>
  11
+    <RootNamespace>dotless.Test</RootNamespace>
  12
+    <AssemblyName>dotless.Test</AssemblyName>
  13
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  14
+    <FileAlignment>512</FileAlignment>
  15
+    <FileUpgradeFlags>
  16
+    </FileUpgradeFlags>
  17
+    <OldToolsVersion>3.5</OldToolsVersion>
  18
+    <UpgradeBackupLocation />
  19
+    <PublishUrl>publish\</PublishUrl>
  20
+    <Install>true</Install>
  21
+    <InstallFrom>Disk</InstallFrom>
  22
+    <UpdateEnabled>false</UpdateEnabled>
  23
+    <UpdateMode>Foreground</UpdateMode>
  24
+    <UpdateInterval>7</UpdateInterval>
  25
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
  26
+    <UpdatePeriodically>false</UpdatePeriodically>
  27
+    <UpdateRequired>false</UpdateRequired>
  28
+    <MapFileExtensions>true</MapFileExtensions>
  29
+    <ApplicationRevision>0</ApplicationRevision>
  30
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
  31
+    <IsWebBootstrapper>false</IsWebBootstrapper>
  32
+    <UseApplicationTrust>false</UseApplicationTrust>
  33
+    <BootstrapperEnabled>true</BootstrapperEnabled>
  34
+  </PropertyGroup>
  35
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  36
+    <DebugSymbols>true</DebugSymbols>
  37
+    <DebugType>full</DebugType>
  38
+    <Optimize>false</Optimize>
  39
+    <OutputPath>bin\Debug\</OutputPath>
  40
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
  41
+    <ErrorReport>prompt</ErrorReport>
  42
+    <WarningLevel>4</WarningLevel>
  43
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
  44
+  </PropertyGroup>
  45
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  46
+    <DebugType>pdbonly</DebugType>
  47
+    <Optimize>true</Optimize>
  48
+    <OutputPath>bin\Release\</OutputPath>
  49
+    <DefineConstants>TRACE</DefineConstants>
  50
+    <ErrorReport>prompt</ErrorReport>
  51
+    <WarningLevel>4</WarningLevel>
  52
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
  53
+  </PropertyGroup>
  54
+  <ItemGroup>
  55
+    <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
  56
+      <SpecificVersion>False</SpecificVersion>
  57
+      <HintPath>..\..\lib\Pandora\Microsoft.Practices.ServiceLocation.dll</HintPath>
  58
+    </Reference>
  59
+    <Reference Include="Moq, Version=4.0.10531.7, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
  60
+      <SpecificVersion>False</SpecificVersion>
  61
+      <HintPath>..\..\lib\Moq\Moq.dll</HintPath>
  62
+    </Reference>
  63
+    <Reference Include="nunit.framework, Version=2.5.1.9189, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
  64
+      <SpecificVersion>False</SpecificVersion>
  65
+      <HintPath>..\..\lib\NUnit\nunit.framework.dll</HintPath>
  66
+    </Reference>
  67
+    <Reference Include="System" />
  68
+    <Reference Include="System.Core">
  69
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
  70
+    </Reference>
  71
+    <Reference Include="System.Web" />
  72
+    <Reference Include="System.Web.Abstractions">
  73
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
  74
+    </Reference>
  75
+    <Reference Include="System.Xml.Linq">
  76
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
  77
+    </Reference>
  78
+    <Reference Include="System.Data.DataSetExtensions">
  79
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
  80
+    </Reference>
  81
+    <Reference Include="System.Data" />
  82
+    <Reference Include="System.Xml" />
  83
+  </ItemGroup>
  84
+  <ItemGroup>
  85
+    <Compile Include="Specs\Compression\ColorsFixture.cs" />
  86
+    <Compile Include="Specs\Compression\CommentsFixture.cs" />
  87
+    <Compile Include="CompressedSpecFixtureBase.cs" />
  88
+    <Compile Include="Specs\Compression\ImportFixture.cs" />
  89
+    <Compile Include="Specs\Compression\SelectorsFixture.cs" />
  90
+    <Compile Include="Specs\Compression\WhitespaceFixture.cs" />
  91
+    <Compile Include="Specs\ScriptFixture.cs" />
  92
+    <Compile Include="TestStylizer.cs" />
  93
+    <Compile Include="Unit\Engine\CacheDecoratorFixture.cs" />
  94
+    <Compile Include="Unit\Engine\CommentBug.cs" />
  95
+    <Compile Include="Unit\Engine\NullVariableValueBug.cs" />
  96
+    <Compile Include="Unit\Engine\ParameterDecoratorFixture.cs" />
  97
+    <Compile Include="Unit\Engine\PathAggregatorBug.cs" />
  98
+    <Compile Include="Unit\Parameters\ParameterSourceFixture.cs" />
  99
+    <Compile Include="Unit\Response\CachedCssResponseFixture.cs" />
  100
+    <Compile Include="Specs\OptimizationsFixture.cs" />
  101
+    <Compile Include="SpecFixtureBase.cs" />
  102
+    <Compile Include="Specs\CommentsFixture.cs" />
  103
+    <Compile Include="Specs\ColorsFixture.cs" />
  104
+    <Compile Include="Specs\AccessorsFixture.cs" />
  105
+    <Compile Include="DictionaryReader.cs" />
  106
+    <Compile Include="Specs\Functions\AbsFixture.cs" />
  107
+    <Compile Include="Specs\Functions\AlphaFixture.cs" />
  108
+    <Compile Include="Specs\Functions\BlueFixture.cs" />
  109
+    <Compile Include="Specs\Functions\CielFixture.cs" />
  110
+    <Compile Include="Specs\Functions\ComplementFixture.cs" />
  111
+    <Compile Include="Specs\Functions\FloorFixture.cs" />
  112
+    <Compile Include="Specs\Functions\FormatStringFixture.cs" />
  113
+    <Compile Include="Specs\Functions\GrayscaleFixture.cs" />
  114
+    <Compile Include="Specs\Functions\GreenFixture.cs" />
  115
+    <Compile Include="Specs\Functions\HslaFixture.cs" />
  116
+    <Compile Include="Specs\Functions\HslFixture.cs" />
  117
+    <Compile Include="Specs\Functions\HueFixture.cs" />
  118
+    <Compile Include="Specs\Functions\LightnessFixture.cs" />
  119
+    <Compile Include="Specs\Functions\MixFixture.cs" />
  120
+    <Compile Include="Specs\Functions\PercentageFixture.cs" />
  121
+    <Compile Include="Specs\Functions\RedFixture.cs" />
  122
+    <Compile Include="Specs\Functions\RgbaFixture.cs" />
  123
+    <Compile Include="Specs\Functions\RgbFixture.cs" />
  124
+    <Compile Include="Specs\Functions\RoundFixture.cs" />
  125
+    <Compile Include="Specs\Functions\SaturationFixture.cs" />
  126
+    <Compile Include="Specs\ImportFixture.cs" />
  127
+    <Compile Include="Specs\MixinsArgsFixture.cs" />
  128
+    <Compile Include="Specs\ScopeFixture.cs" />
  129
+    <Compile Include="Specs\MixinsFixture.cs" />
  130
+    <Compile Include="Specs\ParensFixture.cs" />
  131
+    <Compile Include="Specs\OperationsFixture.cs" />
  132
+    <Compile Include="Specs\VariablesFixture.cs" />
  133
+    <Compile Include="Specs\SelectorsFixture.cs" />
  134
+    <Compile Include="Specs\Css3Fixture.cs" />
  135
+    <Compile Include="Specs\CssFixture.cs" />
  136
+    <Compile Include="Specs\StringsFixture.cs" />
  137
+    <Compile Include="Specs\RulesetsFixture.cs" />
  138
+    <Compile Include="Specs\WhitespaceFixture.cs" />
  139
+    <Compile Include="Properties\AssemblyInfo.cs" />
  140
+    <Compile Include="Config\ConfigurationFixture.cs" />
  141
+    <Compile Include="Unit\Response\CssResponceFixture.cs" />
  142
+    <Compile Include="HttpFixtureBase.cs" />
  143
+  </ItemGroup>
  144
+  <ItemGroup>
  145
+    <ProjectReference Include="..\dotless.Core\dotless.Core.csproj">
  146
+      <Project>{D7A24E58-68D0-4B10-A324-EA33C822FA56}</Project>
  147
+      <Name>dotless.Core</Name>
  148
+    </ProjectReference>
  149
+  </ItemGroup>
  150
+  <ItemGroup>
  151
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
  152
+      <Visible>False</Visible>
  153
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
  154
+      <Install>false</Install>
  155
+    </BootstrapperPackage>
  156
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
  157
+      <Visible>False</Visible>
  158
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
  159
+      <Install>true</Install>
  160
+    </BootstrapperPackage>
  161
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
  162
+      <Visible>False</Visible>
  163
+      <ProductName>Windows Installer 3.1</ProductName>
  164
+      <Install>true</Install>
  165
+    </BootstrapperPackage>
  166
+  </ItemGroup>
  167
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  168
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
  169
+       Other similar extension points exist, see Microsoft.Common.targets.
  170
+  <Target Name="BeforeBuild">
  171
+  </Target>
  172
+  <Target Name="AfterBuild">
  173
+  </Target>
  174
+  -->
174 175
 </Project>

0 notes on commit 03f6b8f

Please sign in to comment.
Something went wrong with that request. Please try again.