Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed description and toString so that description is implemented a…

…nd toString just calls it.

Plus a small formatting change for my old tired eyes.
  • Loading branch information...
commit 8fc7130e932aa6f46d94c5634deb4230c13f23fa 1 parent 4c25af3
Alan Condit authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 runtime/ObjC/Framework/CommonTree.m
12 runtime/ObjC/Framework/CommonTree.m
View
@@ -279,7 +279,7 @@ - (NSString *) treeDescription
- (void) setUnknownTokenBoundaries
{
if ( children == nil ) {
- if ( startIndex<0 || stopIndex<0 ) {
+ if ( startIndex < 0 || stopIndex < 0 ) {
startIndex = stopIndex = [token getTokenIndex];
}
return;
@@ -319,11 +319,6 @@ - (void) setChildIndex:(NSInteger) anIndex
- (NSString *) description
{
- return [self toString];
-}
-
-- (NSString *) toString
-{
if ( [self isNil] ) {
return @"nil";
}
@@ -336,6 +331,11 @@ - (NSString *) toString
return token.text;
}
+- (NSString *) toString
+{
+ return [self description];
+}
+
@synthesize token;
@synthesize startIndex;
@synthesize stopIndex;
Please sign in to comment.
Something went wrong with that request. Please try again.