]> O.S.I.I.S - jp/crow.git/commitdiff
code color
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 11 Mar 2018 01:16:32 +0000 (02:16 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 11 Mar 2018 01:16:32 +0000 (02:16 +0100)
CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs
CrowIDE/src/Editors/Parsers/XMLParser.cs

index e605dd55735c59409fe4806e7e8e149b6d9258fb..72e916eb7df49a026120b63668c33f34bd0a8fba 100644 (file)
@@ -47,7 +47,7 @@ namespace Crow.Coding
                #region CTOR
                public SourceEditor (): base()
                {
-                       formatting.Add ((int)XMLParser.TokenType.AttributeName, new TextFormatting (Color.Teal, Color.Transparent));
+                       formatting.Add ((int)XMLParser.TokenType.AttributeName, new TextFormatting (Color.DarkJungleGreen, Color.Transparent));
                        formatting.Add ((int)XMLParser.TokenType.ElementName, new TextFormatting (Color.DarkBlue, Color.Transparent));
                        formatting.Add ((int)XMLParser.TokenType.ElementStart, new TextFormatting (Color.Black, Color.Transparent));
                        formatting.Add ((int)XMLParser.TokenType.ElementEnd, new TextFormatting (Color.Black, Color.Transparent));
@@ -61,6 +61,7 @@ namespace Crow.Coding
                        formatting.Add ((int)BufferParser.TokenType.BlockComment, new TextFormatting (Color.Gray, Color.Transparent, false, true));
                        formatting.Add ((int)BufferParser.TokenType.LineComment, new TextFormatting (Color.Gray, Color.Transparent, false, true));
                        formatting.Add ((int)BufferParser.TokenType.OperatorOrPunctuation, new TextFormatting (Color.Black, Color.Transparent));
+                       formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.Teal, Color.Transparent));
                        //formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent));
 
                        parsing.Add (".crow", "Crow.Coding.XMLParser");
@@ -86,7 +87,7 @@ namespace Crow.Coding
                int requestedLine = 0, requestedCol = 0;
                volatile bool isDirty = false;
 
-               const int leftMarginGap = 3;//gap between items in margin and text
+               const int leftMarginGap = 10;//gap between items in margin and text
                const int foldSize = 9;//folding rectangles size
                const int foldHSpace = 4;//folding level tabulation x
                int foldMargin { get { return parser == null ? 0 : parser.SyntacticTreeMaxDepth * foldHSpace; }}//folding margin size
index d31e1023db6abfd7d466cbdb382eac084275f2bf..b1c50f2a526792590bf8f17bb19173e58924787a 100644 (file)
@@ -17,8 +17,8 @@ namespace Crow.Coding
                        BlockCommentStart = BufferParser.TokenType.BlockCommentStart,
                        BlockComment = BufferParser.TokenType.BlockComment,
                        BlockCommentEnd = BufferParser.TokenType.BlockCommentEnd,
-                       ElementName = BufferParser.TokenType.Identifier,
-                       AttributeName = BufferParser.TokenType.Keyword,
+                       ElementName = BufferParser.TokenType.Type,
+                       AttributeName = BufferParser.TokenType.Identifier,
                        ElementClosing = BufferParser.TokenType.StatementEnding,
                        Affectation = BufferParser.TokenType.OperatorOrPunctuation,
                        AttributeValueOpening = BufferParser.TokenType.StringLitteralOpening,