ThirdParty/Pygments/pygments/lexers/webmisc.py

changeset 6651
e8f3b5568b21
parent 5713
6762afd9f963
equal deleted inserted replaced
6650:1dd52aa8897c 6651:e8f3b5568b21
436 (r'(\s+)(function)(\s+)', 436 (r'(\s+)(function)(\s+)',
437 bygroups(Text, Keyword.Declaration, Text), 'root') 437 bygroups(Text, Keyword.Declaration, Text), 'root')
438 ], 438 ],
439 'varname': [ 439 'varname': [
440 (r'\(:', Comment, 'comment'), 440 (r'\(:', Comment, 'comment'),
441 (r'(' + qname + ')(\()?', bygroups(Name, Punctuation), 'operator'), 441 (r'(' + qname + r')(\()?', bygroups(Name, Punctuation), 'operator'),
442 ], 442 ],
443 'singletype': [ 443 'singletype': [
444 include('whitespace'), 444 include('whitespace'),
445 (r'\(:', Comment, 'comment'), 445 (r'\(:', Comment, 'comment'),
446 (ncname + r'(:\*)', Name.Variable, 'operator'), 446 (ncname + r'(:\*)', Name.Variable, 'operator'),
641 bygroups(Keyword.Declaration, Text, Keyword.Declaration), 'operator'), 641 bygroups(Keyword.Declaration, Text, Keyword.Declaration), 'operator'),
642 (r'(declare)(\s+)(default)(\s+)(order)', 642 (r'(declare)(\s+)(default)(\s+)(order)',
643 bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'), 643 bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'),
644 (r'(declare)(\s+)(context)(\s+)(item)', 644 (r'(declare)(\s+)(context)(\s+)(item)',
645 bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'), 645 bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'operator'),
646 (ncname + ':\*', Name, 'operator'), 646 (ncname + r':\*', Name, 'operator'),
647 ('\*:'+ncname, Name.Tag, 'operator'), 647 (r'\*:'+ncname, Name.Tag, 'operator'),
648 ('\*', Name.Tag, 'operator'), 648 (r'\*', Name.Tag, 'operator'),
649 (stringdouble, String.Double, 'operator'), 649 (stringdouble, String.Double, 'operator'),
650 (stringsingle, String.Single, 'operator'), 650 (stringsingle, String.Single, 'operator'),
651 651
652 (r'(\}|\])', popstate_callback), 652 (r'(\}|\])', popstate_callback),
653 653
659 (r'(declare)(\s+)(base-uri)', 659 (r'(declare)(\s+)(base-uri)',
660 bygroups(Keyword.Declaration, Text, Keyword.Declaration), 'namespacedecl'), 660 bygroups(Keyword.Declaration, Text, Keyword.Declaration), 'namespacedecl'),
661 661
662 # NAMESPACE KEYWORD 662 # NAMESPACE KEYWORD
663 (r'(declare)(\s+)(default)(\s+)(element|function)', 663 (r'(declare)(\s+)(default)(\s+)(element|function)',
664 bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration), 'namespacekeyword'), 664 bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Keyword.Declaration),
665 'namespacekeyword'),
665 (r'(import)(\s+)(schema|module)', 666 (r'(import)(\s+)(schema|module)',
666 bygroups(Keyword.Pseudo, Text, Keyword.Pseudo), 'namespacekeyword'), 667 bygroups(Keyword.Pseudo, Text, Keyword.Pseudo), 'namespacekeyword'),
667 (r'(declare)(\s+)(copy-namespaces)', 668 (r'(declare)(\s+)(copy-namespaces)',
668 bygroups(Keyword.Declaration, Text, Keyword.Declaration), 'namespacekeyword'), 669 bygroups(Keyword.Declaration, Text, Keyword.Declaration), 'namespacekeyword'),
669 670
859 ] 860 ]
860 } 861 }
861 862
862 863
863 class CirruLexer(RegexLexer): 864 class CirruLexer(RegexLexer):
864 """ 865 r"""
865 Syntax rules of Cirru can be found at: 866 Syntax rules of Cirru can be found at:
866 http://cirru.org/ 867 http://cirru.org/
867 868
868 * using ``()`` for expressions, but restricted in a same line 869 * using ``()`` for expressions, but restricted in a same line
869 * using ``""`` for strings, with ``\`` for escaping chars 870 * using ``""`` for strings, with ``\`` for escaping chars

eric ide

mercurial