The R Project SVN R-packages

Rev

Rev 6230 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6230 Rev 6232
Line 209... Line 209...
209
	if(!linebuffer || ![linebuffer length]) {
209
	if(!linebuffer || ![linebuffer length]) {
210
		[re endProtected];
210
		[re endProtected];
211
		return nil;
211
		return nil;
212
	}
212
	}
213
 
213
 
214
	// delete all comments
214
	// delete all lines consisting of comments
215
	linebuffer = [linebuffer stringByReplacingOccurrencesOfRegex:@"(?sm)#.*?$" withString:@""];
215
	linebuffer = [linebuffer stringByReplacingOccurrencesOfRegex:@"(?sm)^\\s*#.*?$" withString:@""];
216
 
216
 
217
	// convert scope string to single line
217
	// convert scope string to single line
218
	linebuffer = [linebuffer stringByReplacingOccurrencesOfRegex:@"[\n\r\t]+" withString:@" "];
218
	linebuffer = [linebuffer stringByReplacingOccurrencesOfRegex:@"[\n\r\t]+" withString:@" "];
219
 
219
 
220
	// first we need to find out whether we're in a text part or code part
220
	// first we need to find out whether we're in a text part or code part