comparison MoinMoin/support/pygments/lexers/functional.py @ 5803:6446873d152f

upgraded bundled pygments from 1.3.1 to 1.4
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 01 Dec 2011 02:26:16 +0100
parents f76914e77229
children b48a69886ca4
comparison
equal deleted inserted replaced
5802:dba48cb280f9 5803:6446873d152f
379 (r'[][(),;`{}]', Punctuation), 379 (r'[][(),;`{}]', Punctuation),
380 ], 380 ],
381 'import': [ 381 'import': [
382 # Import statements 382 # Import statements
383 (r'\s+', Text), 383 (r'\s+', Text),
384 (r'"', String, 'string'),
384 # after "funclist" state 385 # after "funclist" state
385 (r'\)', Punctuation, '#pop'), 386 (r'\)', Punctuation, '#pop'),
386 (r'qualified\b', Keyword), 387 (r'qualified\b', Keyword),
387 # import X as Y 388 # import X as Y
388 (r'([A-Z][a-zA-Z0-9_.]*)(\s+)(as)(\s+)([A-Z][a-zA-Z0-9_.]*)', 389 (r'([A-Z][a-zA-Z0-9_.]*)(\s+)(as)(\s+)([A-Z][a-zA-Z0-9_.]*)',
548 infix_syms = r'[=<>@^|&+\*/$%-]' 549 infix_syms = r'[=<>@^|&+\*/$%-]'
549 primitives = ['unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array'] 550 primitives = ['unit', 'int', 'float', 'bool', 'string', 'char', 'list', 'array']
550 551
551 tokens = { 552 tokens = {
552 'escape-sequence': [ 553 'escape-sequence': [
553 (r'\\[\"\'ntbr]', String.Escape), 554 (r'\\[\\\"\'ntbr]', String.Escape),
554 (r'\\[0-9]{3}', String.Escape), 555 (r'\\[0-9]{3}', String.Escape),
555 (r'\\x[0-9a-fA-F]{2}', String.Escape), 556 (r'\\x[0-9a-fA-F]{2}', String.Escape),
556 ], 557 ],
557 'root': [ 558 'root': [
558 (r'\s+', Text), 559 (r'\s+', Text),
599 'dotted': [ 600 'dotted': [
600 (r'\s+', Text), 601 (r'\s+', Text),
601 (r'\.', Punctuation), 602 (r'\.', Punctuation),
602 (r'[A-Z][A-Za-z0-9_\']*(?=\s*\.)', Name.Namespace), 603 (r'[A-Z][A-Za-z0-9_\']*(?=\s*\.)', Name.Namespace),
603 (r'[A-Z][A-Za-z0-9_\']*', Name.Class, '#pop'), 604 (r'[A-Z][A-Za-z0-9_\']*', Name.Class, '#pop'),
604 (r'[a-z][a-z0-9_\']*', Name, '#pop'), 605 (r'[a-z_][A-Za-z0-9_\']*', Name, '#pop'),
605 ], 606 ],
606 } 607 }
607 608
608 609
609 class ErlangLexer(RegexLexer): 610 class ErlangLexer(RegexLexer):
686 (r'('+atom_re+')(:)', bygroups(Name.Namespace, Punctuation)), 687 (r'('+atom_re+')(:)', bygroups(Name.Namespace, Punctuation)),
687 (r'^('+atom_re+r')(\s*)(\()', bygroups(Name.Function, Text, Punctuation)), 688 (r'^('+atom_re+r')(\s*)(\()', bygroups(Name.Function, Text, Punctuation)),
688 (r'[+-]?'+base_re+r'#[0-9a-zA-Z]+', Number.Integer), 689 (r'[+-]?'+base_re+r'#[0-9a-zA-Z]+', Number.Integer),
689 (r'[+-]?\d+', Number.Integer), 690 (r'[+-]?\d+', Number.Integer),
690 (r'[+-]?\d+.\d+', Number.Float), 691 (r'[+-]?\d+.\d+', Number.Float),
691 (r'[][:_@\".{}()|;,]', Punctuation), 692 (r'[]\[:_@\".{}()|;,]', Punctuation),
692 (variable_re, Name.Variable), 693 (variable_re, Name.Variable),
693 (atom_re, Name), 694 (atom_re, Name),
694 (r'\?'+macro_re, Name.Constant), 695 (r'\?'+macro_re, Name.Constant),
695 (r'\$(?:'+escape_re+r'|\\[ %]|[^\\])', String.Char), 696 (r'\$(?:'+escape_re+r'|\\[ %]|[^\\])', String.Char),
696 (r'#'+atom_re+r'(:?\.'+atom_re+r')?', Name.Label), 697 (r'#'+atom_re+r'(:?\.'+atom_re+r')?', Name.Label),