[svn] r7318: nemerle/trunk/ncc/parsing/AST.n
nemerle/trunk/ncc/parsing/MainParser.n vs-plugin/trunk/Nemerl...
IT
svnadmin at nemerle.org
Mon Jan 22 01:40:40 CET 2007
Log:
Working on field location.
Author: IT
Date: Mon Jan 22 01:40:36 2007
New Revision: 7318
Modified:
nemerle/trunk/ncc/parsing/AST.n
nemerle/trunk/ncc/parsing/MainParser.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n
Modified: nemerle/trunk/ncc/parsing/AST.n
==============================================================================
--- nemerle/trunk/ncc/parsing/AST.n (original)
+++ nemerle/trunk/ncc/parsing/AST.n Mon Jan 22 01:40:36 2007
@@ -351,6 +351,12 @@
public Combine(l2 : Location) : Location
{
+ if (IsEmpty)
+ l2
+ else if (l2.IsEmpty)
+ this
+ else
+ {
mutable lbeg;
mutable cbeg;
@@ -375,6 +381,7 @@
Location(this, lbeg, cbeg, lend, cend)
}
+ }
public Intersect(l2 : Location) : Location
requires FileIndex == l2.FileIndex || FileIndex == 0 || l2.FileIndex == 0
Modified: nemerle/trunk/ncc/parsing/MainParser.n
==============================================================================
--- nemerle/trunk/ncc/parsing/MainParser.n (original)
+++ nemerle/trunk/ncc/parsing/MainParser.n Mon Jan 22 01:40:36 2007
@@ -1033,7 +1033,8 @@
]>)
);
take_attributes_out (ref customs, System.AttributeTargets.Field, true, mods);
- def result = ClassMember.Field (loc + last_tok.Location, id, mods, ret_type);
+ def floc = loc.Combine (last_tok.Location).Combine (bodyLocation);
+ def result = ClassMember.Field (floc, id, mods, ret_type);
result._bodyLocation = bodyLocation;
result;
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n Mon Jan 22 01:40:36 2007
@@ -232,14 +232,14 @@
// else
// null
- | fb is FieldBuilder =>
+ //| fb is FieldBuilder =>
- def name = fb.Ast.name;
+ // def name = fb.Ast.name;
- if (!name.Location.IsGenerated && name.Location.Contains(fileIndex, line, col))
- fb
- else
- find(tail);
+ // if (!name.Location.IsGenerated && name.Location.Contains(fileIndex, line, col))
+ // fb
+ // else
+ // find(tail);
| mb is MethodBuilder =>
More information about the svn
mailing list