[svn]
r7124: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprFinder.n
IT
svnadmin at nemerle.org
Wed Dec 20 06:26:33 CET 2006
Log:
Fixed finding MacroEnvelop.
Author: IT
Date: Wed Dec 20 06:26:29 2006
New Revision: 7124
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprFinder.n
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprFinder.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprFinder.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ExprFinder.n Wed Dec 20 06:26:29 2006
@@ -290,7 +290,9 @@
_texprLocation = loc;
_texprObject = info.Node;
- when (loc == _pexprLocation && _texprObject is TExpr)
+ when (_texprObject is TExpr)
+ {
+ if (loc == _pexprLocation)
{
match (_texprObject :> TExpr)
{
@@ -302,6 +304,19 @@
| _ => ()
}
}
+ else
+ {
+ match (_texprObject :> TExpr)
+ {
+ | MacroEnvelope(Call(Ref(name) as r, _), _, _)
+ when name.Id == PExprName && r.Location == _pexprLocation =>
+
+ info.Stop();
+
+ | _ => ()
+ }
+ }
+ }
}
}
@@ -321,8 +336,11 @@
{
#if PRINT_AST
Trace.WriteLine("");
- Trace.WriteLine($"PExpr: $(_pexprLocation.Line):$(_pexprLocation.Column):"
- "$(_pexprLocation.EndLine):$(_pexprLocation.EndColumn) $_line:$_col.");
+ Trace.WriteLine(
+ $"PExpr: $(_pexprLocation.Line):$(_pexprLocation.Column):"
+ "$(_pexprLocation.EndLine):$(_pexprLocation.EndColumn)"
+ "$(if (_pexprLocation.IsGenerated) '-' else '+') "
+ "$_line:$_col.");
Trace.WriteLine($"$_pexprObject");
#endif
@@ -402,8 +420,11 @@
os = os.Substring(0, 200) + "...";
Trace.WriteLine("");
- Trace.WriteLine(s + $"$(obj.GetType().FullName) $(loc.Line):$(loc.Column):"
- "$(loc.EndLine):$(loc.EndColumn) $_line:$_col.");
+ Trace.WriteLine(s +
+ $"$(obj.GetType().FullName) "
+ "$(loc.Line):$(loc.Column):$(loc.EndLine):$(loc.EndColumn)"
+ "$(if (loc.IsGenerated) '-' else '+') "
+ "$_line:$_col.");
Trace.WriteLine(s + os.Replace("\n", "\n" + s));
#endif
More information about the svn
mailing list