- Timestamp:
- 05/22/07 00:41:32 (18 months ago)
- Files:
-
- 1 modified
-
util/cperl-mode.el (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
util/cperl-mode.el
r15237 r16490 1470 1470 ;;; 1471 1471 ;;; Highlighting new keywords/builtins: 1472 ;;; class, 1472 ;;; class, role, 1473 1473 ;;; has, state, does, 1474 1474 ;;; say, … … 1485 1485 ;;; "Complex" "Exception" "Seq" "Range" "Set" "Junction" "Pair" "Mapping" "Signature" "Capture", 1486 1486 ;;; "Bool" "Array" "Hash" "IO" "Code" "Routine" "Sub" "Method" "Submethod", 1487 ;;; "Macro" "Rule" "Block" "Bare" "Parametric" "Package" "Module" "Class", 1487 ;;; "Macro" "Rule" "Block" "Bare" "Parametric" "Package" "Module" "Class", "Role", 1488 1488 ;;; "Object" "Grammar" "List" "Lazy" "Eager", 1489 1489 ;;; "Real" "Scalar" "int8" "Socket" … … 2098 2098 (save-excursion 2099 2099 (beginning-of-buffer) 2100 (search-forward-regexp "^[\t ]*\\(use v6\\| class[\t ]+.*;\\)" 320 t))))2100 (search-forward-regexp "^[\t ]*\\(use v6\\|\\(class\\|role\\)[\t ]+.*;\\)" 320 t)))) 2101 2101 2102 2102 (if cperl-can-font-lock … … 6966 6966 (forward-sexp -1) 6967 6967 ;; else {} but not else::func {} 6968 (or (and (looking-at "\\(else\\|class\\| \\|continue\\|grep\\|map\\|gather\\|async\\|atomically\\|given\\|when\\|default\\|loop\\|for\\|BEGIN\\|END\\|CHECK\\|INIT\\|START\\|FIRST\\|ENTER\\|LEAVE\\|KEEP\\|UNDO\\|NEXT\\|LAST\\|PRE\\|POST\\|CATCH\\|CONTROL\\|\\(\\(multi\\|proto\\)[ \t]*\\)?\\(coro\\|sub\\|method\\|submethod\\)?\\)\\>")6968 (or (and (looking-at "\\(else\\|class\\|role\\|continue\\|grep\\|map\\|gather\\|async\\|atomically\\|given\\|when\\|default\\|loop\\|for\\|BEGIN\\|END\\|CHECK\\|INIT\\|START\\|FIRST\\|ENTER\\|LEAVE\\|KEEP\\|UNDO\\|NEXT\\|LAST\\|PRE\\|POST\\|CATCH\\|CONTROL\\|\\(\\(multi\\|proto\\)[ \t]*\\)?\\(coro\\|sub\\|method\\|submethod\\)?\\)\\>") 6969 6969 (not (looking-at "\\(\\sw\\|_\\)+::"))) 6970 6970 ;; sub f {} … … 6983 6983 ;; perl6: todo: correct in P5? Then use-v6'ify! 6984 6984 (beginning-of-line) 6985 (looking-at "\\s *}?\\s *\\(\\(els\\(e\\s +\\|\\)\\)?if\\|un\\(less\\|til\\)\\|class\\| gather\\|async\\|atomically\\|given\\|wh\\(ile\\|en\\)\\|loop\\|for\\|\\(\\(multi\\|proto\\)[ \t]*\\)?\\(coro\\|sub\\|method\\|submethod\\)?\\)\\>"))))6985 (looking-at "\\s *}?\\s *\\(\\(els\\(e\\s +\\|\\)\\)?if\\|un\\(less\\|til\\)\\|class\\|role\\|gather\\|async\\|atomically\\|given\\|wh\\(ile\\|en\\)\\|loop\\|for\\|\\(\\(multi\\|proto\\)[ \t]*\\)?\\(coro\\|sub\\|method\\|submethod\\)?\\)\\>")))) 6986 6986 (error nil)))) 6987 6987 … … 7788 7788 "given" "when" "default" "has" "returns" "of" "is" "does" 7789 7789 "\\(\\(multi\\|proto\\)[ \t]*\\)?\\(coro\\|sub\\|method\\|submethod\\)?" 7790 "class" " try")7790 "class" "role" "try") 7791 7791 "\\|") ; Flow control 7792 7792 "\\)\\>") 2) ; was "\\)[ \n\t;():,\|&]" … … 7867 7867 ;; bit" "int" "str" "num" "ref" "bool" "Bit" "Int" "Str" "Num" "Ref" 7868 7868 ;; Bool" "Array" "Hash" "IO" "Code" "Routine" "Sub" "Method" "Submethod" 7869 ;; Macro" "Rule" "Block" "Bare" "Parametric" "Package" "Module" "Class" 7869 ;; Macro" "Rule" "Block" "Bare" "Parametric" "Package" "Module" "Class" "Role" 7870 7870 ;; Object" "Grammar" "List" "Lazy" "Eager" 7871 7871 ;; Real" "Scalar" "int8" "Socket" … … 7873 7873 "Complex\\|Exception\\|Seq\\|Range\\|Set\\|Junction\\|Pair\\|Mapping\\|Signature\\|Capture\\|" 7874 7874 "Bool\\|Array\\|Hash\\|IO\\|Code\\|Routine\\|Sub\\|Method\\|Submethod\\|" 7875 "Macro\\|Rule\\|Block\\|Bare\\|Parametric\\|Package\\|Module\\|Class\\| "7875 "Macro\\|Rule\\|Block\\|Bare\\|Parametric\\|Package\\|Module\\|Class\\|Role\\|" 7876 7876 "Object\\|Grammar\\|List\\|Lazy\\|Eager\\|" 7877 7877 "Real\\|Scalar\\|int8\\|Socket\\|" … … 7890 7890 ;; "grep" "has" "if" "keys" "kv" "last" "local" "loop" "map" "my" "next" 7891 7891 ;; "no" "our" "pairs" "package" "pop" "pos" "pick" "print" "printf" "push" 7892 ;; "q" "qq" "qw" "qx" "redo" "rx" "reduce" "return" " say" "scalar" "shift"7892 ;; "q" "qq" "qw" "qx" "redo" "rx" "reduce" "return" "role" "say" "scalar" "shift" 7893 7893 ;; "sort" "splice" "split" "study" "state" "sum" "take" "type" "sub" "tie" "tr" 7894 7894 ;; "undef" "uniq" "unless" "unshift" "untie" "until" "uniq" "use" … … 7899 7899 "l\\(ast\\|o\\(cal\\|op\\)\\)\\|m\\(a\\(p\\|x\\)\\|in\\|y\\)\\|n\\(ext\\|o\\)\\|our\\|" 7900 7900 "p\\(a\\(ckage\\|irs\\)\\|ick\\|rint\\(\\|f\\)\\|ush\\|o\\(p\\|s\\)\\)\\|" 7901 "q\\(\\|q\\|w\\|x\\|r\\)\\|rx\\|re\\(turn\\|d\\(o\\|uce\\)\\)\\| s\\(ay\\|pli\\(ce\\|t\\)\\|"7901 "q\\(\\|q\\|w\\|x\\|r\\)\\|rx\\|re\\(turn\\|d\\(o\\|uce\\)\\)\\|role\\|s\\(ay\\|pli\\(ce\\|t\\)\\|" 7902 7902 "calar\\|t\\(udy\\|ate\\)\\|u\\(b\\|m\\)\\|hift\\|ort\\)\\|t\\(r\\|ie\\|ype\\|aken?\\)\\|" 7903 7903 "u\\(se\\|n\\(iq\\|shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|" … … 7938 7938 'font-lock-function-name-face 7939 7939 'font-lock-variable-name-face)))) 7940 '("\\<\\(package\\|class\\|r equire\\|use\\|import\\|no\\|bootstrap\\)[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t;]" ; require A if B;7940 '("\\<\\(package\\|class\\|role\\|require\\|use\\|import\\|no\\|bootstrap\\)[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t;]" ; require A if B; 7941 7941 2 font-lock-function-name-face) 7942 7942 '("^[ \t]*format[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t]*=[ \t]*$" … … 8773 8773 "/\\<sub[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)\\)[ \\t]*\\(([^()]*)[ \t]*\\)?\\([ \t]*:[^#{;]*\\)?\\([{#]\\|$\\)/\\3/" 8774 8774 "-r" 8775 "/\\<\\(package\\|class\\ )[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)\\)[ \\t]*\\([#;]\\|$\\)/\\2/"; perl68775 "/\\<\\(package\\|class\\|role\\)[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)\\)[ \\t]*\\([#;]\\|$\\)/\\2/"; perl6 8776 8776 "-r" 8777 "/\\<\\(package\\|class\\ )[ \\t]*;/\\1;/"))8777 "/\\<\\(package\\|class\\|role\\)[ \\t]*;/\\1;/")) 8778 8778 res) 8779 8779 (if add (setq args (cons "-a" args))) … … 8986 8986 (insert (elt elt 3) 8987 8987 127 8988 (if (string-match "^\\(package\\|class\\ ) " (car elt)) ; perl68988 (if (string-match "^\\(package\\|class\\|role\\) " (car elt)) ; perl6 8989 8989 (substring (car elt) 8) 8990 8990 (car elt) ) … … 9123 9123 (concat 9124 9124 "^\\(" 9125 "\\(package\\|class\\ )\\>"9125 "\\(package\\|class\\|role\\)\\>" 9126 9126 "\\|" 9127 9127 "sub\\>[^\n]+::"
