Browse Source

[Ast] 'where' keyword was missing in parsed query where clause.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
17b0fe0e64
  1. 4
      ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs

4
ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs

@ -3361,9 +3361,7 @@ namespace ICSharpCode.NRefactory.CSharp
public override object Visit (Mono.CSharp.Linq.Where w) public override object Visit (Mono.CSharp.Linq.Where w)
{ {
var result = new QueryWhereClause (); var result = new QueryWhereClause ();
var location = LocationsBag.GetLocations (w); result.AddChild (new CSharpTokenNode (Convert (w.Location), QueryWhereClause.WhereKeywordRole), QueryWhereClause.WhereKeywordRole);
if (location != null)
result.AddChild (new CSharpTokenNode (Convert (location [0]), QueryWhereClause.WhereKeywordRole), QueryWhereClause.WhereKeywordRole);
if (w.Expr != null) if (w.Expr != null)
result.AddChild ((Expression)w.Expr.Accept (this), Roles.Condition); result.AddChild ((Expression)w.Expr.Accept (this), Roles.Condition);
return result; return result;

Loading…
Cancel
Save