aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextView.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2013-01-25 22:25:29 +0000
committerstuconnolly <stuart02@gmail.com>2013-01-25 22:25:29 +0000
commit29797ba0fe84e314e51b994df04140c8621602dd (patch)
tree55df1b95e4025e3a1df3b698b9979dafaadd2c1c /Source/SPTextView.m
parent4faf9d57efd88123216f78b292886a5ee086e421 (diff)
downloadsequelpro-29797ba0fe84e314e51b994df04140c8621602dd.tar.gz
sequelpro-29797ba0fe84e314e51b994df04140c8621602dd.tar.bz2
sequelpro-29797ba0fe84e314e51b994df04140c8621602dd.zip
Move the flex parsing function definitions to their own file so they're not duplicated in multiple places.
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r--Source/SPTextView.m18
1 files changed, 3 insertions, 15 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index aeef2276..39398a46 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -52,23 +52,12 @@
#import "SPBundleCommandRunner.h"
#import "NoodleLineNumberView.h"
#import "SPCopyTable.h"
+#import "SPEditorTokens.h"
+#import "SPSyntaxParser.h"
#import <SPMySQL/SPMySQL.h>
#pragma mark -
-#pragma mark lex init
-
-/**
- * Include all the extern variables and prototypes required for flex (used for syntax highlighting)
- */
-#import "SPEditorTokens.h"
-extern NSUInteger yylex();
-extern NSUInteger yyuoffset, yyuleng;
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-void yy_switch_to_buffer(YY_BUFFER_STATE);
-YY_BUFFER_STATE yy_scan_string (const char *);
-
-#pragma mark -
#pragma mark attribute definition
#define kAPlinked @"Linked" // attribute for a via auto-pair inserted char
@@ -83,7 +72,7 @@ YY_BUFFER_STATE yy_scan_string (const char *);
#define kBTQuoteValue @"isBTQuoted"
#pragma mark -
-#pragma mark constant definitions
+#pragma mark Constant definitions
#define SP_CQ_SEARCH_IN_MYSQL_HELP_MENU_ITEM_TAG 1000
#define SP_CQ_COPY_AS_RTF_MENU_ITEM_TAG 1001
@@ -102,7 +91,6 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse);
@end
-
// some helper functions for handling rectangles and points
// needed in roundedBezierPathAroundRange:
static inline CGFloat SPRectTop(NSRect rectangle) { return rectangle.origin.y; }