This commit is contained in:
Бондарев Иван 2018-06-14 21:54:15 +02:00
parent d67c6201f1
commit 1fedf97ba3

View file

@ -118,8 +118,18 @@ namespace VisualPascalABC
if (CheckForCommentOrKav(textArea.Document.TextContent, beg_off)) if (CheckForCommentOrKav(textArea.Document.TextContent, beg_off))
return false; return false;
char c = textArea.Document.TextContent[off]; char c = textArea.Document.TextContent[off];
while (char.IsWhiteSpace(c)) while (char.IsWhiteSpace(c) || c == '}')
{ {
if (c == '}')
{
while (c != '{')
{
off--;
if (off < 0)
break;
c = textArea.Document.TextContent[off];
}
}
off--; off--;
if (off < 0) if (off < 0)
return false; return false;
@ -130,6 +140,8 @@ namespace VisualPascalABC
{ {
return true; return true;
} }
if (c == 't' || c == 'd' || c == 'o') if (c == 't' || c == 'd' || c == 'o')
{ {
StringBuilder keyword = new StringBuilder(); StringBuilder keyword = new StringBuilder();
@ -389,6 +401,8 @@ namespace VisualPascalABC
i = off; i = off;
while (i < Text.Length && !is_comm && Text[i] != '\n') while (i < Text.Length && !is_comm && Text[i] != '\n')
{ {
if (Text[i] == '{')
return false;
if (Text[i] == '}') if (Text[i] == '}')
{ {
return true; return true;