38 lines
1.6 KiB
Python
38 lines
1.6 KiB
Python
|
import commands, os.path, sets, sys
|
||
|
|
||
|
import color, default, mode, lex, lex_sql, method, tab, tab_sql
|
||
|
|
||
|
class Sql(mode.Fundamental):
|
||
|
def __init__(self, w):
|
||
|
mode.Fundamental.__init__(self, w)
|
||
|
|
||
|
self.tag_matching = True
|
||
|
self.grammar = lex_sql.SqlGrammar()
|
||
|
self.lexer = lex.Lexer(self.grammar)
|
||
|
|
||
|
self.colors = {
|
||
|
'sql comment': color.build('red', 'default', 'bold'),
|
||
|
'c comment': color.build('red', 'default', 'bold'),
|
||
|
'operator1': color.build('yellow', 'default', 'bold'),
|
||
|
'operator2': color.build('yellow', 'default', 'bold'),
|
||
|
'attribute1': color.build('magenta', 'default', 'bold'),
|
||
|
'attribute2': color.build('magenta', 'default', 'bold'),
|
||
|
'keyword1': color.build('cyan', 'default', 'bold'),
|
||
|
'keyword2': color.build('cyan', 'default', 'bold'),
|
||
|
'pseudo-keyword1': color.build('cyan', 'default', 'bold'),
|
||
|
'pseudo-keyword2': color.build('cyan', 'default', 'bold'),
|
||
|
'type1': color.build('green', 'default', 'bold'),
|
||
|
'type2': color.build('green', 'default', 'bold'),
|
||
|
'function': color.build('yellow', 'default', 'bold'),
|
||
|
'quoted': color.build('yellow', 'default', 'bold'),
|
||
|
'string': color.build('green', 'default', 'bold'),
|
||
|
'bareword': color.build('default', 'default', 'bold'),
|
||
|
}
|
||
|
|
||
|
#self.highlighter.lex_buffer()
|
||
|
#self.get_regions()
|
||
|
self.tabber = tab_sql.SQLTabber(self)
|
||
|
|
||
|
def name(self):
|
||
|
return "Sql"
|