1
0

python_syntax 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --- Syntax items ---
  2. cCustomFunc xxx match /\w\+\s*\((\)\@=/
  3. links to Function
  4. cCustomClass xxx match /\w\+\s*\(::\)\@=/
  5. links to Function
  6. pythonStatement xxx return True lambda
  7. nextgroup=pythonFunction skipwhite def
  8. del
  9. nextgroup=pythonFunction skipwhite class
  10. global nonlocal as None, False, yield with print continue break pass assert exec
  11. links to Statement
  12. pythonFunction xxx match /\%(\%(def\s\|class\s\|@\)\s*\)\@<=\h\%(\w\|\.\)*/ contained
  13. links to Function
  14. pythonConditional xxx if else elif
  15. links to Conditional
  16. pythonRepeat xxx for while
  17. links to Repeat
  18. pythonOperator xxx or is and in not
  19. links to Operator
  20. pythonException xxx finally raise except try
  21. links to Exception
  22. pythonInclude xxx from import
  23. links to Include
  24. pythonDecorator xxx match /@/ display nextgroup=pythonFunction skipwhite
  25. links to Define
  26. pythonTodo xxx contained NOTE XXX TODO NOTES FIXME
  27. links to Todo
  28. pythonComment xxx match /#.*$/ contains=pythonTodo,@Spell
  29. links to Comment
  30. pythonEscape xxx match /\\[abfnrtv'"\\]/ contained
  31. match /\\\o\{1,3}/ contained
  32. match /\\x\x\{2}/ contained
  33. match /\%(\\u\x\{4}\|\\U\x\{8}\)/ contained
  34. match /\\N{\a\+\%(\s\a\+\)*}/ contained
  35. match /\\$/
  36. links to Special
  37. pythonString xxx start=/[uU]\=\z(['"]\)/ skip=/\\\\\|\\\z1/ end=/\z1/ contains=pythonEscape,@Spell
  38. start=/[uU]\=\z('''\|"""\)/ end=/\z1/ keepend contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
  39. links to String
  40. pythonDoctest xxx start=/^\s*>>>\s/ end=/^\s*$/ contained contains=ALLBUT,pythonDoctest,@Spell
  41. links to Special
  42. pythonRawString xxx start=/[uU]\=[rR]\z(['"]\)/ skip=/\\\\\|\\\z1/ end=/\z1/ contains=@Spell
  43. start=/[uU]\=[rR]\z('''\|"""\)/ end=/\z1/ keepend contains=pythonSpaceError,pythonDoctest,@Spell
  44. links to String
  45. pythonNumber xxx match /\<0[oO]\=\o\+[Ll]\=\>/
  46. match /\<0[xX]\x\+[Ll]\=\>/
  47. match /\<0[bB][01]\+[Ll]\=\>/
  48. match /\<\%([1-9]\d*\|0\)[Ll]\=\>/
  49. match /\<\d\+[jJ]\>/
  50. match /\<\d\+[eE][+-]\=\d\+[jJ]\=\>/
  51. match /\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@=/
  52. match /\%(^\|\W\)\@<=\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>/
  53. links to Number
  54. pythonBuiltin xxx list locals all classmethod None abs cmp reduce ord hex object memoryview enumerate __debug__ compile str False True issubclass input hasattr frozenset slice callable sum filter range any long execfile min type sorted reload super complex xrange file ascii setattr unicode staticmethod basestring unichr float iter map globals max isinstance dict chr reversed buffer delattr __import__ oct dir eval raw_input hash getattr tuple id bin vars apply bytes repr pow print zip open NotImplemented intern round format bool help property coerce Ellipsis len int next exec set bytearray divmod
  55. links to Function
  56. pythonExceptions xxx OSError EnvironmentError UserWarning NameError ArithmeticError NotImplementedError ReferenceError BaseException LookupError ImportWarning OverflowError SystemExit IndentationError GeneratorExit Warning RuntimeError MemoryError WindowsError AssertionError UnicodeWarning KeyError TypeError TabError ImportError SyntaxWarning SyntaxError UnboundLocalError KeyboardInterrupt UnicodeDecodeError IOError Exception FutureWarning AttributeError UnicodeTranslateError VMSError EOFError FloatingPointError ValueError IndexError RuntimeWarning DeprecationWarning PendingDeprecationWarning UnicodeEncodeError StopIteration UnicodeError BytesWarning StandardError SystemError ZeroDivisionError BufferError
  57. links to Structure
  58. pythonDoctestValue xxx start=/^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\+/ end=/$/ contained
  59. links to Define
  60. OperatorChars xxx match #?\|+\|-\|\*\|;\|:\|,\|<\|>\|&\||\|!\|\~\|%\|=\|)\|(\|{\|}\|\.\|\[\|\]\|/\(/\|*\)\@!#
  61. Spell cluster=NONE
  62. NoSpell cluster=NONE