This commit is contained in:
Ivan Bondarev 2021-08-11 19:51:15 +02:00
parent 5f6e456dec
commit 01ef9fa623
3 changed files with 69 additions and 4 deletions

View file

@ -2824,8 +2824,56 @@ namespace CodeCompletion
ps.AddParameter(prm);
ps.Complete();
cur_scope.AddName(PascalABCCompiler.TreeConverter.compiler_string_consts.dispose_procedure_name,ps);
}
ps = new ProcScope(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, null);
prm = new ElementScope(new SymInfo("i", SymbolKind.Parameter, "i"), TypeTable.int16_type, null, ps);
prm.param_kind = parametr_kind.var_parametr;
ps.AddParameter(prm);
ps.Complete();
ps.si.not_include = true;
cur_scope.AddName(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, ps);
ps = new ProcScope(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, null);
prm = new ElementScope(new SymInfo("i", SymbolKind.Parameter, "i"), TypeTable.uint16_type, null, ps);
prm.param_kind = parametr_kind.var_parametr;
ps.AddParameter(prm);
ps.Complete();
ps.si.not_include = true;
cur_scope.AddName(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, ps);
ps = new ProcScope(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, null);
prm = new ElementScope(new SymInfo("i", SymbolKind.Parameter, "i"), TypeTable.sbyte_type, null, ps);
prm.param_kind = parametr_kind.var_parametr;
ps.AddParameter(prm);
ps.Complete();
ps.si.not_include = true;
cur_scope.AddName(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, ps);
ps = new ProcScope(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, null);
prm = new ElementScope(new SymInfo("i", SymbolKind.Parameter, "i"), TypeTable.int64_type, null, ps);
prm.param_kind = parametr_kind.var_parametr;
ps.AddParameter(prm);
ps.Complete();
ps.si.not_include = true;
cur_scope.AddName(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, ps);
ps = new ProcScope(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, null);
prm = new ElementScope(new SymInfo("i", SymbolKind.Parameter, "i"), TypeTable.uint64_type, null, ps);
prm.param_kind = parametr_kind.var_parametr;
ps.AddParameter(prm);
ps.Complete();
ps.si.not_include = true;
cur_scope.AddName(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, ps);
ps = new ProcScope(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, null);
prm = new ElementScope(new SymInfo("i", SymbolKind.Parameter, "i"), TypeTable.uint32_type, null, ps);
prm.param_kind = parametr_kind.var_parametr;
ps.AddParameter(prm);
ps.Complete();
ps.si.not_include = true;
cur_scope.AddName(PascalABCCompiler.TreeConverter.compiler_string_consts.IncProcedure, ps);
}
public override void visit(hex_constant _hex_constant)
{
//throw new Exception("The method or operation is not implemented.");

View file

@ -1025,13 +1025,13 @@ namespace CodeCompletion
if (meths[i] is ProcScope)
{
if (DomSyntaxTreeVisitor.is_good_overload(meths[i] as ProcScope, arg_types))
if (!meths[i].si.not_include || by_dot)
if (!meths[i].si.not_include || by_dot || mouse_hover)
good_procs.Add(meths[i] as ProcScope);
}
else if (meths[i] is ProcType)
{
if (DomSyntaxTreeVisitor.is_good_overload((meths[i] as ProcType).target, arg_types))
if (!meths[i].si.not_include || by_dot)
if (!meths[i].si.not_include || by_dot || mouse_hover)
good_procs.Add((meths[i] as ProcType).target);
}
}

View file

@ -0,0 +1,17 @@
begin
var a:word:=1;
inc{@procedure Inc(var i: word);@}(a);
var smi:smallint:=1;
inc{@procedure Inc(var i: smallint);@}(smi);
var i: integer;
Inc{@procedure Inc(var i: integer);@}(i);
var si: shortint;
Inc{@procedure Inc(var i: shortint);@}(si);
var lw: longword;
Inc{@procedure Inc(var i: longword);@}(lw);
var i64: int64;
Inc{@procedure Inc(var i: int64);@}(i64);
var ui64: uint64;
Inc{@procedure Inc(var i: uint64);@}(ui64);
end.