This commit is contained in:
parent
179d86528e
commit
b4ec2405a4
|
|
@ -964,6 +964,12 @@ namespace CodeCompletion
|
|||
ExpressionVisitor ev = new ExpressionVisitor(expr, ss, visitor);
|
||||
ev.mouse_hover = true;
|
||||
ss = ev.GetScopeOfExpression();
|
||||
if (ss == null && keyword == PascalABCCompiler.Parsers.KeywordKind.SquareBracket &&
|
||||
expr is ident && !(expr as ident).name.EndsWith("Attribute"))
|
||||
{
|
||||
(expr as ident).name = (expr as ident).name + "Attribute";
|
||||
ss = ev.GetScopeOfExpression();
|
||||
}
|
||||
}
|
||||
if (ss != null && ss.si != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace PascalABCCompiler.Parsers
|
|||
protected Dictionary<string, string> keywords = new Dictionary<string, string>(StringComparer.CurrentCultureIgnoreCase);
|
||||
protected Hashtable ignored_keywords = new Hashtable(StringComparer.CurrentCultureIgnoreCase);
|
||||
protected Hashtable keyword_kinds = new Hashtable(StringComparer.CurrentCultureIgnoreCase);
|
||||
|
||||
|
||||
public DefaultLanguageInformation()
|
||||
{
|
||||
|
||||
|
|
@ -2952,7 +2952,14 @@ namespace PascalABCCompiler.Parsers
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
end = true;
|
||||
if (ch == '[')
|
||||
{
|
||||
keyw = KeywordKind.SquareBracket;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else sb.Insert(0, ch); punkt_sym = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ namespace PascalABCCompiler.Parsers
|
|||
PointerType,
|
||||
Colon,
|
||||
Punkt,
|
||||
SquareBracket,
|
||||
ThrowNew,
|
||||
CommonKeyword,
|
||||
CommonExpressionKeyword
|
||||
|
|
|
|||
|
|
@ -778,7 +778,6 @@ namespace PascalABCCompiler.VBNETParser
|
|||
//if (j>= 0 && Text[j] == '\'') return CodeCompletion.KeywordKind.kw_punkt;
|
||||
while (i >= 0 && (Text[i] == ' ' || char.IsControl(Text[i]))) i--;
|
||||
if (i >= 0 && Text[i] == ':') return PascalABCCompiler.Parsers.KeywordKind.Colon;
|
||||
|
||||
if (i >= 0 && Text[i] == ',')
|
||||
{
|
||||
|
||||
|
|
|
|||
11
TestSuite/intellisense_tests/attributes1.pas
Normal file
11
TestSuite/intellisense_tests/attributes1.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
uses System.Runtime.CompilerServices;
|
||||
|
||||
[MethodImpl{@sealed class System.Runtime.CompilerServices.MethodImplAttribute@}]
|
||||
procedure p1 := exit;
|
||||
|
||||
[MethodImplAttribute{@sealed class System.Runtime.CompilerServices.MethodImplAttribute@}]
|
||||
procedure p2 := exit;
|
||||
|
||||
begin
|
||||
|
||||
end.
|
||||
Loading…
Reference in a new issue