diff options
author | Alex Merry <dev@randomguy3.me.uk> | 2013-03-23 15:49:16 +0000 |
---|---|---|
committer | Alex Merry <dev@randomguy3.me.uk> | 2013-03-23 15:49:42 +0000 |
commit | 194806b17d3309202ddaf7a981ec02581984f033 (patch) | |
tree | 084fd3843f51364352112021453ee9450f977260 /tikzit/src/osx/TikzSourceController.m | |
parent | 8cde489ab6c4169fb03d810447c18eea0d0eaa14 (diff) |
Bring back parser/lexer error reporting
Even better than before!
Diffstat (limited to 'tikzit/src/osx/TikzSourceController.m')
-rw-r--r-- | tikzit/src/osx/TikzSourceController.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tikzit/src/osx/TikzSourceController.m b/tikzit/src/osx/TikzSourceController.m index d01589b..0cb3703 100644 --- a/tikzit/src/osx/TikzSourceController.m +++ b/tikzit/src/osx/TikzSourceController.m @@ -183,8 +183,8 @@ NSDictionary *d = [lastError userInfo]; - NSString *ts = [NSString stringWithFormat: @"Parse error on line %@: %@\n", [d valueForKey:@"lineNumber"], [d valueForKey:NSLocalizedDescriptionKey]]; - NSMutableAttributedString *as = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat: @"Parse error on line %@: %@\n%@\n", [d valueForKey:@"lineNumber"], [d valueForKey:NSLocalizedDescriptionKey], [[d valueForKey:@"syntaxString"] stringByReplacingOccurrencesOfString:@"\t" withString:@""]]]; + NSString *ts = [NSString stringWithFormat: @"Parse error on line %@: %@\n", [d valueForKey:@"startLine"], [d valueForKey:NSLocalizedDescriptionKey]]; + NSMutableAttributedString *as = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat: @"Parse error on line %@: %@\n%@\n", [d valueForKey:@"startLine"], [d valueForKey:NSLocalizedDescriptionKey], [[d valueForKey:@"syntaxString"] stringByReplacingOccurrencesOfString:@"\t" withString:@""]]]; NSInteger tokenLength = [[d valueForKey:@"tokenLength"] integerValue]; // Bit of a mess, offset around to find correct position and correct for 4 characters for every one character of \t |