This commit is contained in:
Бондарев Иван 2018-04-15 14:37:22 +02:00
parent 262658e371
commit 9e3ccf8bcc
3 changed files with 18 additions and 1 deletions

View file

@ -470,7 +470,7 @@ namespace CodeCompletion
{
if (with_body)
{
if (cur_scope != null && cur_scope.IsEqual(founded_scope))
if (cur_scope != null && (cur_scope.IsEqual(founded_scope) || founded_scope is IProcScope && (founded_scope as IProcScope).Realization != null && cur_scope.IsEqual((founded_scope as IProcScope).Realization)))
pos_list.Add(get_position(_function_header.name.meth_name));
}
else

View file

@ -220,10 +220,16 @@ namespace PascalABCCompiler.PascalABCNewParser
public override syntax_tree_node BuildTreeInExprMode(string FileName, string Text)
{
// LineCorrection = -1 не забыть
string origText = Text;
Text = String.Concat("<<expression>>", Environment.NewLine, Text);
localparserhelper = new GPPGParserHelper(Errors, Warnings, FileName);
// localparser.parsertools.LineCorrection = -1;
syntax_tree_node root = localparserhelper.Parse(Text);
if (root == null && origText.Contains("<"))
{
Errors.Clear();
root = localparserhelper.Parse(String.Concat("<<expression>>", Environment.NewLine, origText.Replace("<","&<")));
}
return root as expression;
}

View file

@ -0,0 +1,11 @@
type
t1<T> = class
public
procedure p1; virtual;
end;
procedure t1<T>.p1{@procedure t1<>.p1(); virtual;@} := p1;
begin end.