Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: exp_jstalk
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (32 sloc) 1.014 kb
//
// JSTScanner.h
// jstalk
//
// Created by August Mueller on 1/16/09.
// Copyright 2009 Flying Meat Inc. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface JSTScanner : NSObject {
NSString *_jsString;
unichar *_uString;
NSRange _currentRange;
NSUInteger _stringLength;
unichar _breakChar;
BOOL _tokenIsBreakChar;
// state stuff.
BOOL _inComment;
BOOL _inQuote;
BOOL _inJSTalk;
NSMutableArray *_frames;
}
@property (retain) NSString *jsString;
@property (retain) NSMutableArray *frames;
+ (JSTScanner*) scannerWithString:(NSString*)s;
- (void) scan;
- (NSString*) nextToken;
@end
#define isBreakChar(c) ((c == ' ') || (c == '\r') || (c == '\n') || (c == '\t') ||\
(c == '\"') || (c == '\'') || (c == '(') || (c == ')') ||\
(c == '{') || (c == '}') || (c == '/') || (c == '*') ||\
(c == '\\')\
)
Jump to Line
Something went wrong with that request. Please try again.