Back to index

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

List of all members.

Public Member Functions

def get_tokens_unprocessed

Static Public Attributes

string name = 'Erlang erl session'
list aliases = ['erl']
list filenames = ['*.erl-sh']
list mimetypes = ['text/x-erl-shellsession']

Static Private Attributes

tuple _prompt_re = re.compile(r'\d+>(?=\s|\Z)')

Detailed Description

Shell sessions in erl (for Erlang code).

*New in Pygments 1.1.*

Definition at line 719 of file functional.py.


Member Function Documentation

Definition at line 732 of file functional.py.

00732 
00733     def get_tokens_unprocessed(self, text):
00734         erlexer = ErlangLexer(**self.options)
00735 
00736         curcode = ''
00737         insertions = []
00738         for match in line_re.finditer(text):
00739             line = match.group()
00740             m = self._prompt_re.match(line)
00741             if m is not None:
00742                 end = m.end()
00743                 insertions.append((len(curcode),
00744                                    [(0, Generic.Prompt, line[:end])]))
00745                 curcode += line[end:]
00746             else:
00747                 if curcode:
00748                     for item in do_insertions(insertions,
00749                                     erlexer.get_tokens_unprocessed(curcode)):
00750                         yield item
00751                     curcode = ''
00752                     insertions = []
00753                 if line.startswith('*'):
00754                     yield match.start(), Generic.Traceback, line
00755                 else:
00756                     yield match.start(), Generic.Output, line
00757         if curcode:
00758             for item in do_insertions(insertions,
00759                                       erlexer.get_tokens_unprocessed(curcode)):
00760                 yield item
00761 

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

tuple MoinMoin.support.pygments.lexers.functional.ErlangShellLexer._prompt_re = re.compile(r'\d+>(?=\s|\Z)') [static, private]

Definition at line 730 of file functional.py.

Definition at line 726 of file functional.py.

Definition at line 727 of file functional.py.

Definition at line 728 of file functional.py.

Definition at line 725 of file functional.py.


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