Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
MoinMoin.support.pygments.lexers.other.SqliteConsoleLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.other.SqliteConsoleLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.other.SqliteConsoleLexer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def get_tokens_unprocessed

Static Public Attributes

string name = 'sqlite3con'
list aliases = ['sqlite3']
list filenames = ['*.sqlite3-console']
list mimetypes = ['text/x-sqlite3-console']

Detailed Description

Lexer for example sessions using sqlite3.

*New in Pygments 0.11.*

Definition at line 219 of file other.py.


Member Function Documentation

Definition at line 231 of file other.py.

00231 
00232     def get_tokens_unprocessed(self, data):
00233         sql = SqlLexer(**self.options)
00234 
00235         curcode = ''
00236         insertions = []
00237         for match in line_re.finditer(data):
00238             line = match.group()
00239             if line.startswith('sqlite> ') or line.startswith('   ...> '):
00240                 insertions.append((len(curcode),
00241                                    [(0, Generic.Prompt, line[:8])]))
00242                 curcode += line[8:]
00243             else:
00244                 if curcode:
00245                     for item in do_insertions(insertions,
00246                                               sql.get_tokens_unprocessed(curcode)):
00247                         yield item
00248                     curcode = ''
00249                     insertions = []
00250                 if line.startswith('SQL error: '):
00251                     yield (match.start(), Generic.Traceback, line)
00252                 else:
00253                     yield (match.start(), Generic.Output, line)
00254         if curcode:
00255             for item in do_insertions(insertions,
00256                                       sql.get_tokens_unprocessed(curcode)):
00257                 yield item
00258 

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 227 of file other.py.

Definition at line 228 of file other.py.

list MoinMoin.support.pygments.lexers.other.SqliteConsoleLexer.mimetypes = ['text/x-sqlite3-console'] [static]

Definition at line 229 of file other.py.

Definition at line 226 of file other.py.


The documentation for this class was generated from the following file: