Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
-[PKToken quotedStringValue]
Browse files Browse the repository at this point in the history
git-svn-id: http://parsekit.googlecode.com/svn/trunk@5 47a69902-6c80-45e3-bb3b-c8207f6fa097
  • Loading branch information
todd.ditchendorf committed Aug 24, 2010
1 parent d4216ff commit 91245a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/ParseKit/PKToken.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ typedef enum {
*/
@property (nonatomic, readonly, copy) NSString *stringValue;

/*!
@property stringValue
@brief If a QuotedString, the string value of this token minus the quotes. Otherwise the stringValue.
*/
@property (nonatomic, readonly, copy) NSString *quotedStringValue;

/*!
@property value
@brief Returns an object that represents the value of this token.
Expand Down
6 changes: 6 additions & 0 deletions src/PKToken.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#import <ParseKit/PKToken.h>
#import <ParseKit/PKTypes.h>
#import "NSString+ParseKitAdditions.h"

@interface PKTokenEOF : PKToken {}
+ (PKTokenEOF *)instance;
Expand Down Expand Up @@ -205,6 +206,11 @@ - (id)value {
}


- (NSString *)quotedStringValue {
return [stringValue stringByTrimmingQuotes];
}


- (NSString *)debugDescription {
NSString *typeString = nil;
if (self.isNumber) {
Expand Down

0 comments on commit 91245a7

Please sign in to comment.