antlrtoken+debuggersupport.m

来自「antlr最新版本V3源代码」· M 代码 · 共 39 行

M
39
字号
////  ANTLRToken+DebuggerSupport.m//  ANTLR////  Created by Kay Röpke on 03.12.2006.//  Copyright 2006 classDump. All rights reserved.//#import "ANTLRToken+DebuggerSupport.h"@implementation ANTLRToken(DebuggerSupport)- (NSString *)debuggerDescription{	NSString *text = [self text];	NSMutableString *escapedText;	if (text) {		escapedText = [text mutableCopy];		NSRange wholeString = NSMakeRange(0,[escapedText length]);		[escapedText replaceOccurrencesOfString:@"%" withString:@"%25" options:0 range:wholeString];		[escapedText replaceOccurrencesOfString:@"\n" withString:@"%0A" options:0 range:wholeString];		[escapedText replaceOccurrencesOfString:@"\r" withString:@"%0D" options:0 range:wholeString];	} else {		escapedText = [NSMutableString stringWithString:@""];	}	// format is tokenIndex, type, channel, line, col, (escaped)text	return [NSString stringWithFormat:@"%u %d %u %u %u \"%@", 		[self tokenIndex],		[self type],		[self channel],		[self line],		[self charPositionInLine],		escapedText		];}@end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?