[svn] r7757: nemerle/trunk/ncc/parsing/AST.n
IT
svnadmin at nemerle.org
Thu Aug 9 06:25:49 CEST 2007
Log:
Still working on debugging.
Author: IT
Date: Thu Aug 9 06:25:47 2007
New Revision: 7757
Modified:
nemerle/trunk/ncc/parsing/AST.n
Modified: nemerle/trunk/ncc/parsing/AST.n
==============================================================================
--- nemerle/trunk/ncc/parsing/AST.n (original)
+++ nemerle/trunk/ncc/parsing/AST.n Thu Aug 9 06:25:47 2007
@@ -37,6 +37,7 @@
namespace Nemerle.Compiler {
+ [DebuggerDisplay("{File + \":\" + Line + \":\" + Column + \":\" + EndLine + \":\" + EndColumn + (IsGeneratedOrEmpty ? \"\" : \"+\")}")]
public struct Location : System.IComparable [Location]
{
static this ()
@@ -95,7 +96,9 @@
x.Line,
x.Column,
if (y.EndLine > x.EndLine) y.EndLine else x.EndLine,
- if (y.EndColumn > x.EndColumn) y.EndColumn else x.EndColumn);
+ if (x.EndLine < y.EndLine) y.EndColumn else
+ if (x.EndLine > y.EndLine) x.EndColumn else
+ if (x.EndColumn < y.EndColumn) y.EndColumn else x.EndColumn);
}
else
{
@@ -214,10 +217,7 @@
""
else
if (EndLine != 0)
- {
- def gen = if (IsGeneratedOrEmpty) "" else "+";
- $"$File:$Line:$Column:$EndLine:$EndColumn:$gen "
- }
+ $"$File:$Line:$Column:$EndLine:$EndColumn: "
else if (Line != 0)
$"$File:$Line:$Column: "
else
@@ -483,30 +483,14 @@
public class Located
{
public mutable loc : Location;
- public this () {
- loc = Location_stack.top ();
-#if DEBUG
- when (this is Nemerle.Compiler.Typedtree.TExpr.DebugInfo)
- assert(!loc.IsGeneratedOrEmpty);
-#endif
- }
+ public this () { loc = Location_stack.top (); }
public this (loc : Location) { this.loc = loc }
public IsGenerated : bool { get { loc.IsGenerated } }
public Location : Location
{
get { loc }
- set
- {
-#if DEBUG
- when (this is Nemerle.Compiler.Typedtree.Pattern.As)
- ();
-
- when (this is Nemerle.Compiler.Typedtree.TExpr.DebugInfo)
- assert(!value.IsGeneratedOrEmpty);
-#endif
- loc = value;
- }
+ set { loc = value; }
}
}
More information about the svn
mailing list