diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-11-02 14:12:22 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-11-02 14:12:22 +0400 |
commit | 7599c630af310f5900d3166083a140fbd5efc640 (patch) | |
tree | a3be5f109d566c82822beac64bf27dcb37b03db9 /main/contrib | |
parent | 84ef1901bdfdf642f4926dbf2e9aea70923dee50 (diff) |
Fixed "Bug 1807 - [New Resolver] Code completion issues when typing
indexer argument".
Diffstat (limited to 'main/contrib')
5 files changed, 10 insertions, 10 deletions
diff --git a/main/contrib/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs b/main/contrib/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs index d660f097d8..00386f7827 100644 --- a/main/contrib/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs +++ b/main/contrib/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs @@ -1662,7 +1662,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion var baseUnit = ParseStub ("");
var tmpUnit = baseUnit;
- AstNode expr = baseUnit.GetNodeAt<IdentifierExpression> (location.Line, location.Column - 1);
+ AstNode expr = baseUnit.GetNodeAt<IdentifierExpression> (location.Line, location.Column - 1);
if (expr == null)
expr = baseUnit.GetNodeAt<Attribute> (location.Line, location.Column - 1);
diff --git a/main/contrib/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngineBase.cs b/main/contrib/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngineBase.cs index 9f3fe60da3..2cb81e30bb 100644 --- a/main/contrib/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngineBase.cs +++ b/main/contrib/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngineBase.cs @@ -295,7 +295,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion } else {
memberLocation = new TextLocation (1, 1);
}
-
using (var stream = new System.IO.StringReader (wrapper.ToString ())) {
var parser = new CSharpParser ();
return parser.Parse (stream, wrapInClass ? memberLocation.Line - 2 : 0);
diff --git a/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 82ff149547..8e5cd77ffd 100644 --- a/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -1463,8 +1463,9 @@ namespace ICSharpCode.NRefactory.CSharp if (statementExpression.Expression == null) return result; object expr = statementExpression.Expression.Accept (this); - if (expr != null) + if (expr != null) { result.AddChild ((Expression)expr, ExpressionStatement.Roles.Expression); + } var location = LocationsBag.GetLocations (statementExpression); if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ExpressionStatement.Roles.Semicolon); diff --git a/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 552d289d80..acf5556f1a 100644 --- a/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -7751,7 +7751,7 @@ void case_768() ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { Expression.Error_InvalidExpressionStatement (report, GetLocation (yyVals[0+yyTop])); - yyVal = new StatementExpression (new InvalidExpressionStatement (yyVals[0+yyTop] as Expression)); + yyVal = new InvalidExpressionStatement (yyVals[0+yyTop] as Expression); } else { yyVal = new StatementExpression (s); } diff --git a/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs b/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs index 68725578e0..a833ff2f63 100644 --- a/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs +++ b/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs @@ -6288,7 +6288,7 @@ namespace Mono.CSharp { } } - public class InvalidExpressionStatement : ExpressionStatement + public class InvalidExpressionStatement : Statement { public Expression Expression { get; @@ -6300,22 +6300,22 @@ namespace Mono.CSharp { this.Expression = expr; } - public override void EmitStatement (EmitContext ec) + public override void Emit (EmitContext ec) { // nothing } - public override void Emit (EmitContext ec) + protected override void DoEmit (EmitContext ec) { // nothing } - public override Mono.CSharp.Expression CreateExpressionTree (ResolveContext ec) + protected override void CloneTo (CloneContext clonectx, Statement target) { - return null; + // nothing } - protected override Mono.CSharp.Expression DoResolve (ResolveContext rc) + public override Mono.CSharp.Expression CreateExpressionTree (ResolveContext ec) { return null; } |