- Timestamp:
- 06/01/07 09:16:39 (18 months ago)
- Files:
-
- 1 modified
-
util/cperl-mode.el (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
util/cperl-mode.el
r16577 r16591 1470 1470 ;;; 1471 1471 ;;; Highlighting new keywords/builtins: 1472 ;;; class, role, grammar, rule, 1472 ;;; class, role, grammar, rule, token, regex, 1473 1473 ;;; has, state, does, 1474 1474 ;;; say, … … 2098 2098 (save-excursion 2099 2099 (beginning-of-buffer) 2100 (search-forward-regexp "^[\t ]*\\(use v6\\|\\(class\\|role\\|grammar\\|rule\\ )[\t ]+.*;\\)" 320 t))))2100 (search-forward-regexp "^[\t ]*\\(use v6\\|\\(class\\|role\\|grammar\\|rule\\|token\\|regex\\)[\t ]+.*;\\)" 320 t)))) 2101 2101 2102 2102 (if cperl-can-font-lock … … 6971 6971 (forward-sexp -1) 6972 6972 ;; else {} but not else::func {} 6973 (or (and (looking-at "\\(else\\|class\\|role\\|grammar\\|rule\\| 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\\)?\\)\\>")6973 (or (and (looking-at "\\(else\\|class\\|role\\|grammar\\|rule\\|token\\|regex\\|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\\)?\\)\\>") 6974 6974 (not (looking-at "\\(\\sw\\|_\\)+::"))) 6975 6975 ;; sub f {} … … 6988 6988 ;; perl6: todo: correct in P5? Then use-v6'ify! 6989 6989 (beginning-of-line) 6990 (looking-at "\\s *}?\\s *\\(\\(els\\(e\\s +\\|\\)\\)?if\\|un\\(less\\|til\\)\\|class\\|role\\|grammar\\|rule\\| gather\\|async\\|atomically\\|given\\|wh\\(ile\\|en\\)\\|loop\\|for\\|\\(\\(multi\\|proto\\)[ \t]*\\)?\\(coro\\|sub\\|method\\|submethod\\)?\\)\\>"))))6990 (looking-at "\\s *}?\\s *\\(\\(els\\(e\\s +\\|\\)\\)?if\\|un\\(less\\|til\\)\\|class\\|role\\|grammar\\|rule\\|token\\|regex\\|gather\\|async\\|atomically\\|given\\|wh\\(ile\\|en\\)\\|loop\\|for\\|\\(\\(multi\\|proto\\)[ \t]*\\)?\\(coro\\|sub\\|method\\|submethod\\)?\\)\\>")))) 6991 6991 (error nil)))) 6992 6992 … … 7895 7895 ;; "grep" "has" "if" "keys" "kv" "last" "local" "loop" "map" "my" "next" 7896 7896 ;; "no" "our" "pairs" "package" "pop" "pos" "pick" "print" "printf" "push" 7897 ;; "q" "qq" "qw" "qx" "redo" "rx" "reduce" "re turn" "role" "rule" "say" "scalar" "shift"7898 ;; "sort" "splice" "split" "study" "state" "sum" "take" "t ype" "sub" "tie" "tr"7897 ;; "q" "qq" "qw" "qx" "redo" "rx" "reduce" "regex" "return" "role" "rule" "say" "scalar" "shift" 7898 ;; "sort" "splice" "split" "study" "state" "sum" "take" "taken" "type" "token" "sub" "tie" "tr" 7899 7899 ;; "undef" "uniq" "unless" "unshift" "untie" "until" "uniq" "use" 7900 7900 ;; "while" "y" "zip" … … 7904 7904 "l\\(ast\\|o\\(cal\\|op\\)\\)\\|m\\(a\\(p\\|x\\)\\|in\\|y\\)\\|n\\(ext\\|o\\)\\|our\\|" 7905 7905 "p\\(a\\(ckage\\|irs\\)\\|ick\\|rint\\(\\|f\\)\\|ush\\|o\\(p\\|s\\)\\)\\|" 7906 "q\\(\\|q\\|w\\|x\\|r\\)\\|rx\\|re\\( turn\\|d\\(o\\|uce\\)\\)\\|r\\(o\\|u\\)le\\|s\\(ay\\|pli\\(ce\\|t\\)\\|"7907 "calar\\|t\\(udy\\|ate\\)\\|u\\(b\\|m\\)\\|hift\\|ort\\)\\|t\\(r\\|ie\\|ype\\| aken?\\)\\|"7906 "q\\(\\|q\\|w\\|x\\|r\\)\\|rx\\|re\\(gex\\|turn\\|d\\(o\\|uce\\)\\)\\|r\\(o\\|u\\)le\\|s\\(ay\\|pli\\(ce\\|t\\)\\|" 7907 "calar\\|t\\(udy\\|ate\\)\\|u\\(b\\|m\\)\\|hift\\|ort\\)\\|t\\(r\\|ie\\|ype\\|oken\\|aken?\\)\\|" 7908 7908 "u\\(se\\|n\\(iq\\|shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|" 7909 7909 "while\\|y\\|zip\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually … … 7943 7943 'font-lock-function-name-face 7944 7944 'font-lock-variable-name-face)))) 7945 '("\\<\\(package\\|class\\|role\\|grammar\\|rule\\| require\\|use\\|import\\|no\\|bootstrap\\)[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t;]" ; require A if B;7945 '("\\<\\(package\\|class\\|role\\|grammar\\|rule\\|token\\|regex\\|require\\|use\\|import\\|no\\|bootstrap\\)[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t;]" ; require A if B; 7946 7946 2 font-lock-function-name-face) 7947 7947 '("^[ \t]*format[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t]*=[ \t]*$" … … 8778 8778 "/\\<sub[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)\\)[ \\t]*\\(([^()]*)[ \t]*\\)?\\([ \t]*:[^#{;]*\\)?\\([{#]\\|$\\)/\\3/" 8779 8779 "-r" 8780 "/\\<\\(package\\|class\\|role\\|grammar\\|rule\\ )[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)\\)[ \\t]*\\([#;]\\|$\\)/\\2/"; perl68780 "/\\<\\(package\\|class\\|role\\|grammar\\|rule\\|token\\|regex\\)[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)\\)[ \\t]*\\([#;]\\|$\\)/\\2/"; perl6 8781 8781 "-r" 8782 "/\\<\\(package\\|class\\|role\\|grammar\\|rule\\ )[ \\t]*;/\\1;/"))8782 "/\\<\\(package\\|class\\|role\\|grammar\\|rule\\|token\\|regex\\)[ \\t]*;/\\1;/")) 8783 8783 res) 8784 8784 (if add (setq args (cons "-a" args))) … … 8991 8991 (insert (elt elt 3) 8992 8992 127 8993 (if (string-match "^\\(package\\|class\\|role\\|grammar\\|rule\\ ) " (car elt)) ; perl68993 (if (string-match "^\\(package\\|class\\|role\\|grammar\\|rule\\|token\\|regex\\) " (car elt)) ; perl6 8994 8994 (substring (car elt) 8) 8995 8995 (car elt) ) … … 9128 9128 (concat 9129 9129 "^\\(" 9130 "\\(package\\|class\\|role\\|grammar\\|rule\\ )\\>"9130 "\\(package\\|class\\|role\\|grammar\\|rule\\|token\\|regex\\)\\>" 9131 9131 "\\|" 9132 9132 "sub\\>[^\n]+::"
