# New Ticket Created by Kay-Uwe Huell # Please include the string: [perl #43000] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=43000 >
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi parrot team,
here a clage cleaning patch:
* added syntax folding (use :set foldmethod=syntax) which folds
subs, if/unless-statements, macros and POD
* another small thing added a few lines to call_list.txt to sopport
POSIX's waitpid,read and fork
Regards,
Kiwi
Diffstat:
editor/pir.vim.in | 15 +++++++++++++--
src/call_list.txt | 4 ++++
2 files changed, 17 insertions(+), 2 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGTzRhHSiAp6bcIcgRAjT+AJ9b3dm2JmiNOpe61+QynzVRLV9pvwCgxr74
cZ2iF37oUGf1iuyzRtafDVg=
=t9XU
-----END PGP SIGNATURE-----
Index: src/call_list.txt
===================================================================
--- src/call_list.txt (Revision 18590)
+++ src/call_list.txt (Arbeitskopie)
@@ -423,6 +423,10 @@
v t # void mysql_debug(const char *debug)
# --- end mysqlclient library ---
+i v # void function returning int like fork()
+i i3i # POSIX's waitpid
+i ibi # POSIX's read
+
# win32
l lttl
Index: editor/pir.vim.in
===================================================================
--- editor/pir.vim.in (Revision 18590)
+++ editor/pir.vim.in (Arbeitskopie)
@@ -34,7 +34,9 @@
syn keyword pirOp goto if unless global addr
-syn match pirDirective /\.\(sub\|endm\|pcc_sub\|macro\|end\|emit\|eom\)/
+syn match pirDirectiveSub /\.\(sub\|end\s*$\)/
+syn match pirDirectiveMacro /\.\(macro\|endm\)/
+syn match pirDirective /\.\(pcc_sub\|emit\|eom\)/
syn match pirDirective /\.\(local\|sym\|const\|lex\|global\|globalconst\)/
syn match pirDirective /\.\(endnamespace\|namespace\)/
syn match pirDirective /\.\(param\|arg\|return\|yield\)/
@@ -43,7 +45,7 @@
syn match pirDirective /\.\(pcc_begin_return\|pcc_end_return\)/
syn match pirDirective /\.\(pcc_begin_yield\|pcc_end_yield\)/
-syn match pirDirective /:\(main\|method\|load\|anon\|multi\|immediate\|outer\|lex\)/
+syn match pirDirective /:\(main\|method\|load\|init\|anon\|multi\|immediate\|outer\|lex\|vtable\)/
syn match pirDirective /:\(flat\|slurpy\|optional\|opt_flag\|named\)/
" Macro invocation
@@ -92,6 +94,8 @@
HiLink pirStringSpecial Special
HiLink pirNumber Number
HiLink pirDirective Macro
+ HiLink pirDirectiveSub Macro
+ HiLink pirDirectiveMacro Macro
HiLink pirOp Conditional
delcommand HiLink
@@ -99,4 +103,11 @@
let b:current_syntax = "pir"
+" Folding rules
+syn region foldManual start=/^\s*#.*{{{/ end=/^\s*#.*}}}/ contains=ALL keepend fold
+syn region foldMakro start=/\.macro/ end=/\.endm/ contains=ALLBUT,pirDirectiveMacro keepend fold
+syn region foldSub start=/\.sub/ end=/\.end/ contains=ALLBUT,pirDirectiveSub,pirDirectiveMacro keepend fold
+syn region foldIf start=/^\s*if.*goto\s*\z(\I\i*\)\s*$/ end=/^\s*\z1:\s*$/ contains=ALLBUT,pirDirectiveSub,pirDirectiveMacro keepend fold
+syn region foldUnless start=/^\s*unless.*goto\s*\z(\I\i*\)\s*$/ end=/^\s*\z1:\s*$/ contains=ALLBUT,pirDirectiveSub,pirDirectiveMacro keepend fold
+
" Ops -- dynamically generated from ops2vim.pl
editor.patch.sig
Description: Binary data
