diff --git a/CodeCompletion/DomSyntaxTreeVisitor.cs b/CodeCompletion/DomSyntaxTreeVisitor.cs index a21b047f7..6955d7a54 100644 --- a/CodeCompletion/DomSyntaxTreeVisitor.cs +++ b/CodeCompletion/DomSyntaxTreeVisitor.cs @@ -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."); diff --git a/CodeCompletion/ExpressionVisitor.cs b/CodeCompletion/ExpressionVisitor.cs index 8f9a59c24..0b53058c9 100644 --- a/CodeCompletion/ExpressionVisitor.cs +++ b/CodeCompletion/ExpressionVisitor.cs @@ -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); } } diff --git a/TestSuite/intellisense_tests/inc.pas b/TestSuite/intellisense_tests/inc.pas new file mode 100644 index 000000000..709d0acd0 --- /dev/null +++ b/TestSuite/intellisense_tests/inc.pas @@ -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. \ No newline at end of file