diff options
Diffstat (limited to 'CrowIDE')
| -rw-r--r-- | CrowIDE/CrowIDE.csproj | 3 | ||||
| -rw-r--r-- | CrowIDE/src/Project.cs | 10 | ||||
| -rw-r--r-- | CrowIDE/src/SourceEditor/BufferParser.cs (renamed from CrowIDE/src/SourceEditor/Parser.cs) | 22 | ||||
| -rw-r--r-- | CrowIDE/src/SourceEditor/CSharpParser.cs | 6 | ||||
| -rw-r--r-- | CrowIDE/src/SourceEditor/CodeLine.cs | 4 | ||||
| -rw-r--r-- | CrowIDE/src/SourceEditor/ParsingException.cs | 22 | ||||
| -rw-r--r-- | CrowIDE/src/SourceEditor/SourceEditor.cs | 14 | ||||
| -rw-r--r-- | CrowIDE/src/SourceEditor/StyleParser.cs | 38 | ||||
| -rw-r--r-- | CrowIDE/src/SourceEditor/Token.cs | 2 | ||||
| -rw-r--r-- | CrowIDE/src/SourceEditor/XMLParser.cs | 68 | ||||
| -rw-r--r-- | CrowIDE/ui/IDE.style | 32 |
11 files changed, 100 insertions, 121 deletions
diff --git a/CrowIDE/CrowIDE.csproj b/CrowIDE/CrowIDE.csproj index b916d716..38adac85 100644 --- a/CrowIDE/CrowIDE.csproj +++ b/CrowIDE/CrowIDE.csproj @@ -110,14 +110,13 @@ <Compile Include="src\SourceEditor\CodeLine.cs" /> <Compile Include="src\SourceEditor\CSharpParser.cs" /> <Compile Include="src\SourceEditor\Node.cs" /> - <Compile Include="src\SourceEditor\Parser.cs" /> - <Compile Include="src\SourceEditor\ParsingException.cs" /> <Compile Include="src\SourceEditor\SourceEditor.cs" /> <Compile Include="src\SourceEditor\TextFormatting.cs" /> <Compile Include="src\SourceEditor\Token.cs" /> <Compile Include="src\SourceEditor\XMLParser.cs" /> <Compile Include="src\SourceEditor\StyleParser.cs" /> <Compile Include="src\PropertyContainer.cs" /> + <Compile Include="src\SourceEditor\BufferParser.cs" /> </ItemGroup> <ItemGroup> <Folder Include="ui\" /> diff --git a/CrowIDE/src/Project.cs b/CrowIDE/src/Project.cs index 1cbdecbf..0da5dc19 100644 --- a/CrowIDE/src/Project.cs +++ b/CrowIDE/src/Project.cs @@ -439,10 +439,14 @@ namespace Crow.Coding // } public void GetStyling () { - foreach (ProjectFile pi in flattenNodes.OfType<ProjectFile> ().Where (pp=>pp.Type == ItemType.EmbeddedResource && pp.Extension == ".style")) { - using (Stream s = new MemoryStream (System.Text.Encoding.UTF8.GetBytes(pi.Source))) { - new StyleReader (solution.Styling, s, pi.ResourceID); + try { + foreach (ProjectFile pi in flattenNodes.OfType<ProjectFile> ().Where (pp=>pp.Type == ItemType.EmbeddedResource && pp.Extension == ".style")) { + using (Stream s = new MemoryStream (System.Text.Encoding.UTF8.GetBytes(pi.Source))) { + new StyleReader (solution.Styling, s, pi.ResourceID); + } } + } catch (Exception ex) { + Console.WriteLine (ex.ToString ()); } foreach (ProjectReference pr in flattenNodes.OfType<ProjectReference>()) { Project p = solution.Projects.FirstOrDefault (pp => pp.ProjectGuid == pr.ProjectGUID); diff --git a/CrowIDE/src/SourceEditor/Parser.cs b/CrowIDE/src/SourceEditor/BufferParser.cs index f655fa49..87dd779e 100644 --- a/CrowIDE/src/SourceEditor/Parser.cs +++ b/CrowIDE/src/SourceEditor/BufferParser.cs @@ -10,7 +10,7 @@ namespace Crow.Coding /// <summary> /// base class for tokenizing sources /// </summary> - public abstract class Parser + public abstract class BufferParser { /// <summary> /// Default tokens, this enum may be overriden in derived parser with the new keyword, @@ -42,7 +42,7 @@ namespace Crow.Coding } #region CTOR - public Parser (CodeBuffer _buffer) + public BufferParser (CodeBuffer _buffer) { buffer = _buffer; @@ -108,7 +108,7 @@ namespace Crow.Coding // continue; // } // parser.CurrentPosition = tls [fstTK + 1].Start; - // parser.SetLineInError(new ParsingException(parser, "closing tag not corresponding")); + // parser.SetLineInError(new ParserException(parser, "closing tag not corresponding")); // } // // } @@ -123,8 +123,8 @@ namespace Crow.Coding SyntaxAnalysis (); } catch (Exception ex) { Debug.WriteLine ("Syntax Error: " + ex.ToString ()); - if (ex is ParsingException) - SetLineInError (ex as ParsingException); + if (ex is ParserException) + SetLineInError (ex as ParserException); } } public void tryParseBufferLine(int lPtr) { @@ -137,8 +137,8 @@ namespace Crow.Coding ParseCurrentLine (); } catch (Exception ex) { Debug.WriteLine (ex.ToString ()); - if (ex is ParsingException) - SetLineInError (ex as ParsingException); + if (ex is ParserException) + SetLineInError (ex as ParserException); } } @@ -163,7 +163,7 @@ namespace Crow.Coding public abstract void ParseCurrentLine(); public abstract void SyntaxAnalysis (); - public virtual void SetLineInError(ParsingException ex) { + public virtual void SetLineInError(ParserException ex) { currentTok = default(Token); if (ex.Line >= buffer.LineCount) ex.Line = buffer.LineCount - 1; @@ -220,7 +220,7 @@ namespace Crow.Coding /// </summary> protected virtual char Peek() { if (eol) - throw new ParsingException (this, "Unexpected End of line"); + throw new ParserException (currentLine, currentColumn, "Unexpected End of line"); return currentColumn < buffer [currentLine].Length ? buffer [currentLine] [currentColumn] : '\n'; } @@ -233,7 +233,7 @@ namespace Crow.Coding /// <param name="length">Length.</param> protected virtual string Peek(int length) { if (eol) - throw new ParsingException (this, "Unexpected End of Line"); + throw new ParserException (currentLine, currentColumn, "Unexpected End of Line"); int lg = Math.Min(length, Math.Max (buffer [currentLine].Length - currentColumn, buffer [currentLine].Length - currentColumn - length)); if (lg == 0) return ""; @@ -287,7 +287,7 @@ namespace Crow.Coding /// </summary> protected void SkipWhiteSpaces () { if (currentTok.Type != TokenType.Unknown) - throw new ParsingException (this, "current token should be reset to unknown (0) before skiping white spaces"); + throw new ParserException (currentLine, currentColumn, "current token should be reset to unknown (0) before skiping white spaces"); while (!eol) { if (!char.IsWhiteSpace (Peek ())||Peek()=='\n') break; diff --git a/CrowIDE/src/SourceEditor/CSharpParser.cs b/CrowIDE/src/SourceEditor/CSharpParser.cs index 7d56ce43..8c445824 100644 --- a/CrowIDE/src/SourceEditor/CSharpParser.cs +++ b/CrowIDE/src/SourceEditor/CSharpParser.cs @@ -7,7 +7,7 @@ using System.Linq; namespace Crow.Coding { - public class CSharpParser : Parser + public class CSharpParser : BufferParser { #region keywords string[] keywords = new string[] { @@ -171,7 +171,7 @@ namespace Crow.Coding if (Peek () == '\n') { if (currentTok != TokenType.Unknown) - throw new ParsingException (this, "Unexpected end of line"); + throw new ParserException (currentLine, currentColumn, "Unexpected end of line"); Read (); eol = true; continue; @@ -182,7 +182,7 @@ namespace Crow.Coding Debugger.Break (); currentTok.Start = CurrentPosition; - currentTok.Type = (Parser.TokenType)TokenType.BlockComment; + currentTok.Type = (BufferParser.TokenType)TokenType.BlockComment; currentTok += ReadLineUntil ("*/"); if (Peek (2) == "*/") { readToCurrTok (2); diff --git a/CrowIDE/src/SourceEditor/CodeLine.cs b/CrowIDE/src/SourceEditor/CodeLine.cs index 622584c7..612cac73 100644 --- a/CrowIDE/src/SourceEditor/CodeLine.cs +++ b/CrowIDE/src/SourceEditor/CodeLine.cs @@ -10,7 +10,7 @@ namespace Crow.Coding public List<Token> Tokens; public int EndingState = 0; public Node SyntacticNode; - public ParsingException exception; + public ParserException exception; public CodeLine (string _content){ Content = _content; @@ -52,7 +52,7 @@ namespace Crow.Coding } } - public void SetLineInError (ParsingException ex) { + public void SetLineInError (ParserException ex) { Tokens = null; exception = ex; } diff --git a/CrowIDE/src/SourceEditor/ParsingException.cs b/CrowIDE/src/SourceEditor/ParsingException.cs deleted file mode 100644 index 88c51c9b..00000000 --- a/CrowIDE/src/SourceEditor/ParsingException.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -namespace Crow.Coding -{ - public class ParsingException : Exception - { - public int Line; - public int Column; - public ParsingException(Parser parser, string txt) - : base(string.Format("Parser exception ({0},{1}): {2}", parser.currentLine, parser.currentColumn, txt)) - { - Line = parser.currentLine; - Column = parser.currentColumn; - } - public ParsingException(Parser parser, string txt, Exception innerException) - : base(txt, innerException) - { - txt = string.Format("Parser exception ({0},{1}): {2}", parser.currentLine, parser.currentColumn, txt); - } - } -} - diff --git a/CrowIDE/src/SourceEditor/SourceEditor.cs b/CrowIDE/src/SourceEditor/SourceEditor.cs index d594776e..8d8a5d68 100644 --- a/CrowIDE/src/SourceEditor/SourceEditor.cs +++ b/CrowIDE/src/SourceEditor/SourceEditor.cs @@ -58,10 +58,10 @@ namespace Crow.Coding formatting.Add ((int)XMLParser.TokenType.AttributeValue, new TextFormatting (Color.TractorRed, Color.Transparent, false, true)); formatting.Add ((int)XMLParser.TokenType.XMLDecl, new TextFormatting (Color.AoEnglish, Color.Transparent)); - formatting.Add ((int)Parser.TokenType.BlockComment, new TextFormatting (Color.Gray, Color.Transparent, false, true)); - formatting.Add ((int)Parser.TokenType.LineComment, new TextFormatting (Color.Gray, Color.Transparent, false, true)); - formatting.Add ((int)Parser.TokenType.Affectation, new TextFormatting (Color.Black, Color.Transparent)); - formatting.Add ((int)Parser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent)); + 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.Affectation, new TextFormatting (Color.Black, Color.Transparent)); + formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent)); parsing.Add (".crow", "Crow.Coding.XMLParser"); parsing.Add (".template", "Crow.Coding.XMLParser"); @@ -122,7 +122,7 @@ namespace Crow.Coding int printedCurrentLine = 0;//Index of the currentline in the PrintedLines array CodeBuffer buffer; - Parser parser; + BufferParser parser; List<CodeLine> PrintedLines;//list of lines visible in the Editor depending on scrolling and folding Dictionary<int, TextFormatting> formatting = new Dictionary<int, TextFormatting>(); @@ -348,7 +348,7 @@ namespace Crow.Coding } } - Parser getParserFromExt (string extension) { + BufferParser getParserFromExt (string extension) { if (string.IsNullOrEmpty(extension)) return null; if (!parsing.ContainsKey(extension)) @@ -356,7 +356,7 @@ namespace Crow.Coding Type parserType = Type.GetType (parsing [extension]); if (parserType == null) return null; - return (Parser)Activator.CreateInstance (parserType, buffer ); + return (BufferParser)Activator.CreateInstance (parserType, buffer ); } #region Public Crow Properties diff --git a/CrowIDE/src/SourceEditor/StyleParser.cs b/CrowIDE/src/SourceEditor/StyleParser.cs index 9952b267..a4273ede 100644 --- a/CrowIDE/src/SourceEditor/StyleParser.cs +++ b/CrowIDE/src/SourceEditor/StyleParser.cs @@ -7,7 +7,7 @@ using System.Linq; namespace Crow.Coding { - public class StyleParser : Parser + public class StyleParser : BufferParser { enum States { init, classNames, members, value, endOfStatement } @@ -15,15 +15,13 @@ namespace Crow.Coding { } - #region Regular Expression for validity checks - private static Regex rxValidChar = new Regex(@"\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\p{Cf}"); - private static Regex rxNameStartChar = new Regex(@"_|\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}"); - private static Regex rxNameChar = new Regex(@"\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\p{Cf}"); - private static Regex rxDecimal = new Regex(@"[0-9]+"); - private static Regex rxHexadecimal = new Regex(@"[0-9a-fA-F]+"); - #endregion - #region Character ValidityCheck + static Regex rxValidChar = new Regex(@"\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\p{Cf}"); + static Regex rxNameStartChar = new Regex(@"_|\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}"); + static Regex rxNameChar = new Regex(@"\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\p{Mn}|\p{Mc}|\p{Nd}|\p{Pc}|\p{Cf}"); + static Regex rxDecimal = new Regex(@"[0-9]+"); + static Regex rxHexadecimal = new Regex(@"[0-9a-fA-F]+"); + public bool nextCharIsValidCharStartName { get { return rxNameStartChar.IsMatch(new string(new char[]{Peek()})); } @@ -58,7 +56,7 @@ namespace Crow.Coding if (Peek () == '\n') { if (currentTok != TokenType.Unknown) - throw new ParsingException (this, "Unexpected end of line"); + throw new ParserException (currentLine, currentColumn, "Unexpected end of line"); Read (); eol = true; continue; @@ -80,31 +78,31 @@ namespace Crow.Coding break; case ',': if (curState != States.init || curState != States.classNames ) - throw new ParsingException (this, "Unexpected char ','"); + throw new ParserException (currentLine, currentColumn, "Unexpected char ','"); readAndResetCurrentTok (TokenType.UnaryOp, true); curState = States.classNames; break; case '{': if (!(curState == States.init || curState == States.classNames)) - throw new ParsingException (this, "Unexpected char '{'"); + throw new ParserException (currentLine, currentColumn, "Unexpected char '{'"); readAndResetCurrentTok (TokenType.OpenBlock, true); curState = States.members; break; case '}': if (curState != States.members) - throw new ParsingException (this, "Unexpected char '}'"); + throw new ParserException (currentLine, currentColumn, "Unexpected char '}'"); readAndResetCurrentTok (TokenType.CloseBlock, true); curState = States.classNames; break; case '=': if (curState == States.classNames) - throw new ParsingException (this, "Unexpected char '='"); + throw new ParserException (currentLine, currentColumn, "Unexpected char '='"); readAndResetCurrentTok (TokenType.Affectation, true); curState = States.value; break; case '"': if (curState != States.value) - throw new ParsingException (this, "Unexpected char '\"'"); + throw new ParserException (currentLine, currentColumn, "Unexpected char '\"'"); readAndResetCurrentTok (TokenType.StringLitteralOpening, true); while (!eol) { @@ -115,7 +113,7 @@ namespace Crow.Coding break; } if (eol) - throw new ParsingException (this, "Unexpected end of line"); + throw new ParserException (currentLine, currentColumn, "Unexpected end of line"); saveAndResetCurrentTok (TokenType.StringLitteral); readAndResetCurrentTok (TokenType.StringLitteralClosing, true); @@ -123,17 +121,17 @@ namespace Crow.Coding break; case ';': if (curState != States.endOfStatement) - throw new ParsingException (this, "Unexpected end of statement"); + throw new ParserException (currentLine, currentColumn, "Unexpected end of statement"); readAndResetCurrentTok (TokenType.StatementEnding, true); curState = States.members; break; default: if (currentTok.Type != TokenType.Unknown) - throw new ParsingException (this, "error curtok not null"); + throw new ParserException (currentLine, currentColumn, "error curtok not null"); if (curState == States.value) - throw new ParsingException (this, "expecting value enclosed in '\"'"); + throw new ParserException (currentLine, currentColumn, "expecting value enclosed in '\"'"); if (curState == States.endOfStatement) - throw new ParsingException (this, "expecting end of statement"); + throw new ParserException (currentLine, currentColumn, "expecting end of statement"); if (nextCharIsValidCharStartName) { readToCurrTok (true); diff --git a/CrowIDE/src/SourceEditor/Token.cs b/CrowIDE/src/SourceEditor/Token.cs index 36f0242f..c6b8a3bb 100644 --- a/CrowIDE/src/SourceEditor/Token.cs +++ b/CrowIDE/src/SourceEditor/Token.cs @@ -24,7 +24,7 @@ namespace Crow.Coding { public struct Token { - public Parser.TokenType Type; + public BufferParser.TokenType Type; public string Content; public Point Start; public Point End; diff --git a/CrowIDE/src/SourceEditor/XMLParser.cs b/CrowIDE/src/SourceEditor/XMLParser.cs index 952e038b..59601a75 100644 --- a/CrowIDE/src/SourceEditor/XMLParser.cs +++ b/CrowIDE/src/SourceEditor/XMLParser.cs @@ -7,24 +7,24 @@ using System.Linq; namespace Crow.Coding { - public class XMLParser : Parser + public class XMLParser : BufferParser { public new enum TokenType { - Unknown = Parser.TokenType.Unknown, - WhiteSpace = Parser.TokenType.WhiteSpace, - NewLine = Parser.TokenType.NewLine, - LineComment = Parser.TokenType.LineComment, - BlockCommentStart = Parser.TokenType.BlockCommentStart, - BlockComment = Parser.TokenType.BlockComment, - BlockCommentEnd = Parser.TokenType.BlockCommentEnd, - ElementName = Parser.TokenType.Type, - AttributeName = Parser.TokenType.Identifier, - ElementClosing = Parser.TokenType.StatementEnding, - Affectation = Parser.TokenType.Affectation, - AttributeValueOpening = Parser.TokenType.StringLitteralOpening, - AttributeValueClosing = Parser.TokenType.StringLitteralClosing, - AttributeValue = Parser.TokenType.StringLitteral, - XMLDecl = Parser.TokenType.Preprocessor, + Unknown = BufferParser.TokenType.Unknown, + WhiteSpace = BufferParser.TokenType.WhiteSpace, + NewLine = BufferParser.TokenType.NewLine, + LineComment = BufferParser.TokenType.LineComment, + BlockCommentStart = BufferParser.TokenType.BlockCommentStart, + BlockComment = BufferParser.TokenType.BlockComment, + BlockCommentEnd = BufferParser.TokenType.BlockCommentEnd, + ElementName = BufferParser.TokenType.Type, + AttributeName = BufferParser.TokenType.Identifier, + ElementClosing = BufferParser.TokenType.StatementEnding, + Affectation = BufferParser.TokenType.Affectation, + AttributeValueOpening = BufferParser.TokenType.StringLitteralOpening, + AttributeValueClosing = BufferParser.TokenType.StringLitteralClosing, + AttributeValue = BufferParser.TokenType.StringLitteral, + XMLDecl = BufferParser.TokenType.Preprocessor, ElementStart = 50, ElementEnd = 51, } @@ -82,7 +82,7 @@ namespace Crow.Coding } #endregion - public override void SetLineInError (ParsingException ex) + public override void SetLineInError (ParserException ex) { base.SetLineInError (ex); //buffer[ex.Line].Tokens.EndingState = (int)States.init; @@ -111,7 +111,7 @@ namespace Crow.Coding if (Peek () == '\n') { if (currentTok != TokenType.Unknown) - throw new ParsingException (this, "Unexpected end of line"); + throw new ParserException (currentLine, currentColumn, "Unexpected end of line"); Read (); eol = true; continue; @@ -122,7 +122,7 @@ namespace Crow.Coding Debugger.Break (); currentTok.Start = CurrentPosition; - currentTok.Type = (Parser.TokenType)TokenType.BlockComment; + currentTok.Type = (BufferParser.TokenType)TokenType.BlockComment; currentTok += ReadLineUntil ("-->"); if (Peek (3) == "-->") { readToCurrTok (3); @@ -138,11 +138,11 @@ namespace Crow.Coding switch (Peek()) { case '?': if (curState != States.init) - throw new ParsingException (this, "xml decl may appear only on first line"); + throw new ParserException (currentLine, currentColumn, "xml decl may appear only on first line"); readToCurrTok (); currentTok += ReadLineUntil ("?>"); if (Peek (2) != "?>") - throw new ParsingException (this, "expecting '?>'"); + throw new ParserException (currentLine, currentColumn, "expecting '?>'"); readToCurrTok (2); saveAndResetCurrentTok (TokenType.XMLDecl); curState = States.prolog; @@ -153,7 +153,7 @@ namespace Crow.Coding case '-': readToCurrTok (); if (Peek () != '-') - throw new ParsingException (this, "Expecting comment start tag"); + throw new ParserException (currentLine, currentColumn, "Expecting comment start tag"); readToCurrTok (); currentTok += ReadLineUntil ("--"); if (Peek (3) == "-->") { @@ -163,12 +163,12 @@ namespace Crow.Coding saveAndResetCurrentTok (TokenType.BlockComment); break; default: - throw new ParsingException(this, "error"); + throw new ParserException (currentLine, currentColumn, "error"); } break; default: if (!(curState == States.Content || curState == States.XML || curState == States.init || curState == States.prolog)) - throw new ParsingException (this, "Unexpected char: '<'"); + throw new ParserException (currentLine, currentColumn, "Unexpected char: '<'"); if (Peek () == '/') { curState = States.EndTag; readToCurrTok (); @@ -179,7 +179,7 @@ namespace Crow.Coding } if (!nextCharIsValidCharStartName) - throw new ParsingException (this, "Expected element name"); + throw new ParserException (currentLine, currentColumn, "Expected element name"); readToCurrTok (true); while (nextCharIsValidCharName) @@ -191,10 +191,10 @@ namespace Crow.Coding break; case '/': if (curState != States.StartTag) - throw new ParsingException (this, "Unexpected char: '/'"); + throw new ParserException (currentLine, currentColumn, "Unexpected char: '/'"); readToCurrTok (true); if (Peek () != '>') - throw new ParsingException (this, "Expecting '>'"); + throw new ParserException (currentLine, currentColumn, "Expecting '>'"); readAndResetCurrentTok (TokenType.ElementEnd); curState = States.XML; @@ -209,14 +209,14 @@ namespace Crow.Coding curState = States.Content; break; default: - throw new ParsingException (this, "Unexpected char: '>'"); + throw new ParserException (currentLine, currentColumn, "Unexpected char: '>'"); } break; default: switch (curState) { case States.StartTag: if (!nextCharIsValidCharStartName) - throw new ParsingException (this, "Expected attribute name"); + throw new ParserException (currentLine, currentColumn, "Expected attribute name"); readToCurrTok (true); while (nextCharIsValidCharName) readToCurrTok (); @@ -225,14 +225,14 @@ namespace Crow.Coding SkipWhiteSpaces (); if (Peek () != '=') - throw new ParsingException (this, "Expecting: '='"); + throw new ParserException (currentLine, currentColumn, "Expecting: '='"); readAndResetCurrentTok (TokenType.Affectation, true); SkipWhiteSpaces (); char openAttVal = Peek (); if (openAttVal != '"' && openAttVal != '\'') - throw new ParsingException (this, "Expecting attribute value enclosed either in '\"' or in \"'\""); + throw new ParserException (currentLine, currentColumn, "Expecting attribute value enclosed either in '\"' or in \"'\""); readAndResetCurrentTok (TokenType.AttributeValueOpening, true); currentTok.Start = CurrentPosition; @@ -240,11 +240,11 @@ namespace Crow.Coding saveAndResetCurrentTok (TokenType.AttributeValue); if (Peek () != openAttVal) - throw new ParsingException (this, string.Format ("Expecting {0}", openAttVal)); + throw new ParserException (currentLine, currentColumn, string.Format ("Expecting {0}", openAttVal)); readAndResetCurrentTok (TokenType.AttributeValueClosing, true); break; default: - throw new ParsingException (this, "unexpected char: " + Peek ()); + throw new ParserException (currentLine, currentColumn, "unexpected char: " + Peek ()); } break; } @@ -283,7 +283,7 @@ namespace Crow.Coding if (tokPtr < cl.Tokens.Count) { if ((XMLParser.TokenType)cl.Tokens [tokPtr].Type == TokenType.ElementName && cl.Tokens [tokPtr].Content != currentNode.Name) - throw new ParsingException (this, "Closing tag mismatch"); + throw new ParserException (currentLine, currentColumn, "Closing tag mismatch"); } currentNode.EndLine = cl; currentNode = currentNode.Parent; diff --git a/CrowIDE/ui/IDE.style b/CrowIDE/ui/IDE.style index d7212053..ed964dca 100644 --- a/CrowIDE/ui/IDE.style +++ b/CrowIDE/ui/IDE.style @@ -1,25 +1,25 @@ icon { - Width=14; - Height=14; + Width="14"; + Height="14"; } MemberViewLabel { - Margin=1; - Height=Fit; - Width=50%; - Background=White; + Margin="1"; + Height="Fit"; + Width="50%"; + Background="White"; } MemberViewHStack { - Focusable=true; - Height=Fit; - Spacing=1; - MouseEnter={Background=UnitedNationsBlue}; - MouseLeave={Background=Transparent}; + Focusable="true"; + Height="Fit"; + Spacing="1"; + MouseEnter="{Background=UnitedNationsBlue}"; + MouseLeave="{Background=Transparent}"; } IcoBut { - Template = #Crow.Coding.ui.IcoBut.template; - MinimumSize = 10,10; - Width = 8; - Height = 14; - Background = White; + Template = "#Crow.Coding.ui.IcoBut.template"; + MinimumSize = "10,10"; + Width = "8"; + Height = "14"; + Background = "White"; }
\ No newline at end of file |