]> O.S.I.I.S - jp/crow.git/commitdiff
allow commented line in Style '//'
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 1 Feb 2017 05:48:01 +0000 (06:48 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 1 Feb 2017 05:48:01 +0000 (06:48 +0100)
src/StyleReader.cs

index 27b3f4b59bd5913736436b47965b9a30acc7a898..caf6ec0a73deaf1e5ace4295b6b9d307f11f3b39 100644 (file)
@@ -46,7 +46,12 @@ namespace Crow
 
                        while (!EndOfStream) {
                                char c = (Char)Read ();
-
+                               if (c == '/' && !EndOfStream) {
+                                       if ((char)Peek () == '/') {//process comment, skip until newline
+                                               ReadLine ();
+                                               continue;
+                                       }
+                               }
                                switch (state) {
                                case readerState.classNames:
                                        if (c.IsWhiteSpaceOrNewLine () || c == ',' || c == '{') {