Commits

ZyX_I committed a99af1b

@/fwc: Made tests work in vim-7.2.442
Added test/copyout-postproc.zsh (in addition with {tools}/updateouts.zsh it obsoletes own version of updateouts.zsh located in test/)

  • Participants
  • Parent commits 2fc55ee

Comments (0)

Files changed (8)

File plugin/frawor/fwc/compiler.vim

     let maximum=self.getsub(s:F.incrementsub(self.subs[-1], a:maximum))
     if a:maximum==a:minimum
         call self.addif(largsstr.' isnot '.maximum)
-                    \.addthrow('invlen', 0, minimum, largsstr)
+        call        self.addthrow('invlen', 0, minimum, largsstr)
     else
         if a:minimum>0
             call self.addif(largsstr.'<'.minimum)
-                        \.addthrow('tooshort', 0, minimum, largsstr)
+            call        self.addthrow('tooshort', 0, minimum, largsstr)
         endif
         if a:maximum!=-1
             call self.addif(largsstr.'>'.maximum)
-                        \.addthrow('toolong', 0,  maximum, largsstr)
+            call        self.addthrow('toolong', 0,  maximum, largsstr)
         endif
     endif
     return self
         let condition=join(conditions, ' || ')
         let chargstr=a:vstr.'['.argidxstr.']'
         if condition=~#'\v^%([^@]|\V'.chargstr.'\v)+$'
-            call self.up().up()
+            call self.up()
+            call self.up()
             call remove(self.l, -2, -1)
             let condition=substitute(condition, '\V'.chargstr, 'v:val', 'g')
             call self.call('filter('.a:vstr.', '.string('!('.condition.')').')')
         else
             call remove(self.l, -1)
             call self.if(condition)
-                        \.call(removestr)
-                    \.up().addif()
-                        \.increment(argidxstr)
-                    \.up()
-                \.up().up()
+            call         self.call(removestr)
+            call     self.up()
+            call self.addif()
+            call         self.increment(argidxstr)
+            call     self.up()
+            call self.up()
+            call self.up()
         endif
     endif
     return self
                         call self.joinmatches(jstart, vstr)
                     endif
                     call self.let(argidxstr, 0)
-                                \.while(argidxstr.'<len('.vstr.')')
-                                    \.try()
-                                        \.pushms('throwignore')
-                                        \.witharg([vstr, [[argidxstr]]])
+                    call        self.while(argidxstr.'<len('.vstr.')')
+                    call            self.try()
+                    call                self.pushms('throwignore')
+                    call                self.witharg([vstr, [[argidxstr]]])
                 endif
             elseif compargs[0][1][0] is# 'intfunc' &&
                         \has_key(s:_r.FWC_intfuncs[compargs[0][1][1]],
     endif
     if a:type is# 'complete'
         if addedcycle
-            call self.without().popms()
-                        \.increment(argidxstr)
-                    \.up().catch(s:cfreg)
-                        \.call('remove('.vstr.', '.argidxstr.')')
-                    \.up()
-                \.up().up()
-                \.optimizecompf(vstr)
+            call self.without()
+            call self.popms()
+            call         self.increment(argidxstr)
+            call     self.up()
+            call self.catch(s:cfreg)
+            call         self.call('remove('.vstr.', '.argidxstr.')')
+            call self.up()
+            call self.up()
+            call self.up()
+            call self.optimizecompf(vstr)
         endif
         call self.popvstr()
     endif
             let largsstr=self.getlargsstr()
             let proclen=self.getlastsub()
             call self.addif(proclen.' isnot '.largsstr)
-                        \.addthrow('lennmatch', 0, proclen, largsstr)
+            call        self.addthrow('lennmatch', 0, proclen, largsstr)
         endif
         "▶2 addrestmsgs
         if addedsavemsgs
         call add(t.subs, 0)
     endif
     if t.type is# 'check' || t.type is# 'pipe'
-        call        t.let('@$@messages',  '[]')
-                    \.let('@$@pmessages', '[]')
-                    \.try()
+        call t.let('@$@messages',  '[]')
+        call t.let('@$@pmessages', '[]')
+        call t.try()
         call t.compadescr(tree, '', t.type)
-        call t
-                \.up().finally()
-                    \.for('@$@targs', '@$@messages')
-                        \.call('call(@%@.F.warn, @$@targs, {})').up()
-                    \.for('@$@targs', '@$@pmessages')
-                        \.call('call(@%@.p._f.warn, @$@targs, {})').up()
-                \.up().up()
+        call t.up()
+        call t.finally()
+        call     t.for('@$@targs', '@$@messages')
+        call         t.call('call(@%@.F.warn, @$@targs, {})')
+        call     t.up()
+        call     t.for('@$@targs', '@$@pmessages')
+        call         t.call('call(@%@.p._f.warn, @$@targs, {})')
+        call     t.up()
+        call t.up()
+        call t.up()
     else
-        call t.let('@-@', '[]').compadescr(tree, '', t.type)
+        call t.let('@-@', '[]')
+        call t.compadescr(tree, '', t.type)
     endif
     if a:doreturn is# 1
         if t.type is# 'check'

File plugin/frawor/fwc/intfuncs.vim

 function s:r.if.pipe(desc, idx, type)
     let condstr=self.getlvarid('cond')
     call self.try()
-                \.pushms('throwignore')
-                \.compilearg(a:desc[1], a:idx.'(cond)', 'check')
-                \.popms()
-                \.let(condstr, 1)
-            \.up().catch(s:cfreg)
-                \.let(condstr, 0)
-            \.up()
+    call        self.pushms('throwignore')
+    call        self.compilearg(a:desc[1], a:idx.'(cond)', 'check')
+    call        self.popms()
+    call        self.let(condstr, 1)
+    call    self.up()
+    call    self.catch(s:cfreg)
+    call        self.let(condstr, 0)
+    call    self.up()
     if len(a:desc[2])>1
-        call self.addif(condstr).compilearg(a:desc[2], a:idx.'(if)', a:type)
-                    \.up()
+        call self.addif(condstr)
+        call    self.compilearg(a:desc[2], a:idx.'(if)', a:type)
+        call self.up()
         if len(a:desc[3])>1
             call self.addif()
-                        \.compilearg(a:desc[3], a:idx.'(else)', a:type)
-                        \.up()
+            call        self.compilearg(a:desc[3], a:idx.'(else)', a:type)
+            call        self.up()
         endif
     else
         call self.addif('!'.condstr)
-                    \.compilearg(a:desc[3], a:idx.'(else)', a:type)
-                    \.up()
+        call        self.compilearg(a:desc[3], a:idx.'(else)', a:type)
+        call        self.up()
     endif
     return self.up()
 endfunction
 function s:r.run.pipe(desc, idx, type)
     let curargstr=self.argstr()
     call call(s:r.isfunc.check, [['isfunc', 0], a:idx, 'check'], self)
-            \.try()
-                \.let(curargstr, 'call('.curargstr.', '.
+    call    self.try()
+    call        self.let(curargstr, 'call('.curargstr.', '.
                 \                                self.getvar(a:desc[1]).', {})')
-            \.up().catch()
-                \.addthrow('runfail', 1, a:idx, 'v:exception')
+    call    self.up()
+    call    self.catch()
+    call        self.addthrow('runfail', 1, a:idx, 'v:exception')
     let self.typechanged=1
     return self
 endfunction
 function s:r.earg.pipe(desc, idx, type)
     let curargstr=self.argstr()
     call self.addtypecond([type('')], a:idx)
-            \.try()
-                \.let(curargstr, 'eval('.curargstr.')')
-            \.up().catch()
-                \.addthrow('evalfail', 1, a:idx, 'v:exception')
+    call self.try()
+    call     self.let(curargstr, 'eval('.curargstr.')')
+    call self.up()
+    call self.catch()
+    call     self.addthrow('evalfail', 1, a:idx, 'v:exception')
     let self.typechanged=1
     return self
 endfunction
 let s:r.either={'args': ['*arg']}
 function s:r.either.check(desc, idx, type)
     let sucstr=self.getlvarid('succeeded')
-    call self.let(sucstr, 1).addsavemsgs().pushms('throw')
+    call self.let(sucstr, 1)
+    call self.addsavemsgs()
+    call self.pushms('throw')
     if !empty(a:desc[1])
         call self.try()
-                    \.compilearg(a:desc[1][0], a:idx.'(either).0', 'check')
-                \.up().catch(s:cfreg)
-                    \.let(sucstr, 0).up()
+        call        self.compilearg(a:desc[1][0], a:idx.'(either).0', 'check')
+        call self.up()
+        call self.catch(s:cfreg)
+        call        self.let(sucstr, 0)
+        call self.up()
     endif
     let i=1
     for arg in a:desc[1][1:]
         call self.addif('!'.sucstr)
-                    \.let(sucstr, 1)
-                    \.try()
-                        \.compilearg(arg, a:idx.'(either).'.i, 'check')
-                    \.up().catch(s:cfreg)
-                        \.let(sucstr, 0)
-                    \.up()
-                \.up()
+        call        self.let(sucstr, 1)
+        call        self.try()
+        call            self.compilearg(arg, a:idx.'(either).'.i, 'check')
+        call        self.up()
+        call        self.catch(s:cfreg)
+        call            self.let(sucstr, 0)
+        call        self.up()
+        call    self.up()
         let i+=1
     endfor
-    call self.addif(sucstr).addrestmsgs().up().popms()
-                \.addif().addthrow('eitherfail', 1, a:idx).up().up()
+    call self.addif(sucstr)
+    call self.addrestmsgs()
+    call self.up()
+    call self.popms()
+    call self.addif()
+    call self.addthrow('eitherfail', 1, a:idx)
+    call self.up()
+    call self.up()
+    return self
 endfunction
 function s:r.either.complete(desc, idx, type)
     let self.joinlists+=1
     let i=1
     for arg in a:desc[1][1:]
         call self.if('empty('.self.vstrs[-1].')')
-                    \.compilearg(arg, a:idx.'(either).'.i, 'complete')
-                \.up().endif()
+        call        self.compilearg(arg, a:idx.'(either).'.i, 'complete')
+        call self.up()
+        call self.endif()
         let i+=1
     endfor
     return self
 function s:r.tuple.check(desc, idx, type)
     let curargstr=self.argstr()
     call self.addtypecond([type([])], a:idx)
-                \.nextthrow('len('.curargstr.')!='.len(a:desc[1]),
-                \           'invlstlen', a:idx, len(a:desc[1]),
-                \                        'len('.curargstr.')')
+    call self.nextthrow('len('.curargstr.')!='.len(a:desc[1]),
+                \       'invlstlen', a:idx, len(a:desc[1]),
+                \                    'len('.curargstr.')')
     return call(s:F.addtuple, [a:desc, a:idx, a:type], self)
 endfunction
 " Checks whether {argument} is a list with a fixed length and then process given 
     let lststr=self.argstr()
     let istr=self.getlvarid('i')
     call add(self.subs, [istr])
-    call     self.let(largstr, 'len('.lststr.')')
-                \.let(istr, 0)
-                \.while(istr.'<'.largstr)
-                    \.compilearg(a:list[1], a:idx.'(list)', a:type)
-                    \.increment(istr)
-                \.up().up()
+    call self.let(largstr, 'len('.lststr.')')
+    call self.let(istr, 0)
+    call self.while(istr.'<'.largstr)
+    call            self.compilearg(a:list[1], a:idx.'(list)', a:type)
+    call            self.increment(istr)
+    call self.up()
+    call self.up()
     call remove(self.subs, -1)
     return self
 endfunction
             call self.addif(self.getexpr(check[1], keystr).' isnot 0')
         elseif check[0] is# 'any'
             call self.compilearg(check[1], a:idx.'.'.i.'(val)', a:type)
-                        \.continue()
+            call self.continue()
             break
         elseif check[0] is# 'check'
             if !hascheck
             endif
             let hascheck=1
             call self.try()
-                        \.pushms('throw')
-                        \.let(foundstr, 0)
-                        \.witharg([keystr])
-                        \.compilearg(check[1], a:idx.'.'.i.'(key)', 'check')
-                        \.without()
-                        \.let(foundstr, 1)
-                        \.compilearg(check[2], a:idx.'.'.i.'(val)', a:type)
-                        \.popms()
-                    \.up().catch(s:cfreg)
-                        \.addif(foundstr)
-                            \.fail()
-                        \.addrestmsgs(1)
-                    \.up().addif(foundstr)
-                        \.continue().up()
+            call        self.pushms('throw')
+            call        self.let(foundstr, 0)
+            call        self.witharg([keystr])
+            call        self.compilearg(check[1], a:idx.'.'.i.'(key)', 'check')
+            call        self.without()
+            call        self.let(foundstr, 1)
+            call        self.compilearg(check[2], a:idx.'.'.i.'(val)', a:type)
+            call        self.popms()
+            call self.up()
+            call self.catch(s:cfreg)
+            call        self.addif(foundstr)
+            call            self.fail()
+            call        self.addrestmsgs(1)
+            call self.up()
+            call self.addif(foundstr)
+            call        self.continue()
+            call self.up()
             continue
         endif
-        call self.compilearg(check[2], a:idx.'.'.i.'(val)', a:type).continue()
-                    \.up()
+        call self.compilearg(check[2], a:idx.'.'.i.'(val)', a:type)
+        call self.continue()
+        call self.up()
     endfor
     if hascheck
         call remove(self.msgs.savevars, -1)
             if c is# '}'
                 break
             elseif c is# '/'
-                call self.addcon('regex', self.readreg('/')).scan().conclose()
+                call self.addcon('regex', self.readreg('/'))
+                call self.scan()
+                call self.conclose()
             elseif c is# '*'
-                call self.addcon('func').getfunc().scan().conclose()
+                call self.addcon('func')
+                call self.getfunc()
+                call self.scan()
+                call self.conclose()
             elseif c is# '='
-                call self.addcon('expr').getexpr().scan().conclose()
+                call self.addcon('expr')
+                call self.getexpr()
+                call self.scan()
+                call self.conclose()
             elseif c is# '?'
-                call self.addcon('check').scan().scan().conclose()
+                call self.addcon('check')
+                call self.scan()
+                call self.scan()
+                call self.conclose()
             elseif c is# '-'
-                call self.addcon('any').scan().conclose()
+                call self.addcon('any')
+                call self.scan()
+                call self.conclose()
             elseif c is# '"'
-                call self.addcon('eq', self.readstr()).scan().conclose()
+                call self.addcon('eq', self.readstr())
+                call self.scan()
+                call self.conclose()
             elseif c is# "'"
-                call self.addcon('eq', self.readsstr()).scan().conclose()
+                call self.addcon('eq', self.readsstr())
+                call self.scan()
+                call self.conclose()
             elseif c=~#'^\w'
-                call self.addcon('eq', c).scan().conclose()
+                call self.addcon('eq', c)
+                call self.scan()
+                call self.conclose()
             endif
         endwhile
     endif
     let varstr=self.getvar(a:desc[1])
     let matchstr=self.getlvarid('match')
     call self.addtypecond([type('')], a:idx)
-                \.let(matchstr, self.getmatcher(a:desc[2], varstr,
-                \                               curargstr, 0))
-                \.nextthrow(matchstr.' is 0', 'nmatch', a:idx, curargstr)
-                \.let(curargstr, varstr.'['.matchstr.']')
+    call self.let(matchstr, self.getmatcher(a:desc[2], varstr, curargstr, 0))
+    call self.nextthrow(matchstr.' is 0', 'nmatch', a:idx, curargstr)
+    call self.let(curargstr, varstr.'['.matchstr.']')
     let self.typechanged=1
     return self
 endfunction
     let existsstr=self.getfunstatvar('os', s:_r.os.path.exists, 'exists')
     let osdirnamestr=self.getfunstatvar('os', s:_r.os.path.dirname, 'dirname')
     call self.addif('!'.existsstr.'('.curargstr.')')
-                \.let(dirnamestr, normpathstr.'('.curargstr.')')
-                \.let(prevdirstr, '""')
-                \.let(foundstr, 0)
-                \.while(dirnamestr.' isnot# '.prevdirstr)
-                    \.addif('filewritable('.dirnamestr.')==2')
-                        \.let(foundstr, 1)
-                        \.break().up()
-                    \.addif(existsstr.'('.dirnamestr.')')
-                        \.break().up()
-                    \.let(prevdirstr, dirnamestr)
-                    \.let(dirnamestr, osdirnamestr.'('.dirnamestr.')')
-                \.up()
-                \.nextthrow('!'.foundstr, 'nowrite', a:idx, curargstr)
-            \.up().up()
+    call        self.let(dirnamestr, normpathstr.'('.curargstr.')')
+    call        self.let(prevdirstr, '""')
+    call        self.let(foundstr, 0)
+    call        self.while(dirnamestr.' isnot# '.prevdirstr)
+    call            self.addif('filewritable('.dirnamestr.')==2')
+    call                self.let(foundstr, 1)
+    call                self.break()
+    call                self.up()
+    call            self.addif(existsstr.'('.dirnamestr.')')
+    call                self.break()
+    call                self.up()
+    call            self.let(prevdirstr, dirnamestr)
+    call            self.let(dirnamestr, osdirnamestr.'('.dirnamestr.')')
+    call        self.up()
+    call        self.nextthrow('!'.foundstr, 'nowrite', a:idx, curargstr)
+    call self.up()
+    call self.up()
     return self
 endfunction
 "▶2 getpath    :: &self!
     if c=~#'\v^[df]?r?[wWp]?x?$' && c!~#'\v^%(d%(.{,2}x|r)|r)'
         call self.add(c)
     else
-        call self.add('r').ungetc(c)
+        call self.add('r')
+        call self.ungetc(c)
     endif
     return self
 endfunction
             let spec=spec[1:]
         elseif spec[0] is# 'p'
             call call(s:r.path.addpathp, [a:idx], self)
-                        \.nextthrow('!'.isdirstr.'('.curargstr.')',
-                        \           'isdir', a:idx, curargstr)
+            call self.nextthrow('!'.isdirstr.'('.curargstr.')',
+                        \       'isdir', a:idx, curargstr)
             let spec=spec[1:]
         else
             call self.nextthrow('!'.isdirstr.'('.curargstr.')',
 " Overrides current value
 let s:r.value={'args': ['var', 'arg']}
 function s:r.value.check(desc, idx, type)
-    call self.witharg(self.getvar(a:desc[1], 1))
+    return self.witharg(self.getvar(a:desc[1], 1))
                 \.compilearg(a:desc[2], a:idx.'(value)', a:type)
                 \.without()
 endfunction

File plugin/frawor/fwc/parser.vim

         elseif c=~#'^\w'
             call self.add(c)
         else
-            call self.add('').ungetc(c)
+            call self.add('')
+            call self.ungetc(c)
         endif
     else
         call self.add('')
     if c=~#'\v^[df]?r?[wWp]?x?$' && c!~#'\v^%(d%(.{,2}x|r)|r)'
         call self.add(c)
     else
-        call self.add('r').ungetc(c)
+        call self.add('r')
+        call self.ungetc(c)
     endif
     return self
 endfunction
                 elseif v is# '$'
                     call self.getvar()
                 else
-                    call self.ungetc(v).getvar()
+                    call self.ungetc(v)
+                    call self.getvar()
                 endif
             endfor
             call self.conclose()
         elseif c is# '$'
-            call self.addcon().getvar().conclose()
+            call self.addcon()
+            call self.getvar()
+            call self.conclose()
         else
-            call self.addcon().ungetc(c).getvar().conclose()
+            call self.addcon()
+            call self.ungetc(c)
+            call self.getvar()
+            call self.conclose()
         endif
         let requiresdot=1
     endwhile
             if c is# '}'
                 break
             elseif c is# '/'
-                call self.addcon('regex', self.readreg('/')).scan().conclose()
+                call self.addcon('regex', self.readreg('/'))
+                call self.scan()
+                call self.conclose()
             elseif c is# '*'
-                call self.addcon('func').getfunc().scan().conclose()
+                call self.addcon('func')
+                call self.getfunc()
+                call self.scan()
+                call self.conclose()
             elseif c is# '='
-                call self.addcon('expr').getexpr().scan().conclose()
+                call self.addcon('expr')
+                call self.getexpr()
+                call self.scan()
+                call self.conclose()
             elseif c is# '?'
-                call self.addcon('check').scan().scan().conclose()
+                call self.addcon('check')
+                call self.scan()
+                call self.scan()
+                call self.conclose()
             elseif c is# '-'
-                call self.addcon('any').scan().conclose()
+                call self.addcon('any')
+                call self.scan()
+                call self.conclose()
             elseif c is# '"'
-                call self.addcon('eq', self.readstr()).scan().conclose()
+                call self.addcon('eq', self.readstr())
+                call self.scan()
+                call self.conclose()
             elseif c is# "'"
-                call self.addcon('eq', self.readsstr()).scan().conclose()
+                call self.addcon('eq', self.readsstr())
+                call self.scan()
+                call self.conclose()
             elseif c=~#'^\w'
-                call self.addcon('eq', c).scan().conclose()
+                call self.addcon('eq', c)
+                call self.scan()
+                call self.conclose()
             endif
         endwhile
     endif
                 endif
             endwhile
         else
-            call self.ungetc(c).addcon('cur', 0)
+            call self.ungetc(c)
+            call self.addcon('cur', 0)
             while self.len
                 let c=self.readc()
                 if c is# '^'
         elseif c=~#'^\w'
             call self.add(c)
         else
-            call self.ungetc(c).getvar()
+            call self.ungetc(c)
+            call self.getvar()
         endif
     endwhile
     return self.conclose()
 function s:parser.getvar()
     let c=self.readc()
     if c=~#'^\w'
-        call self.addcon('plugvar').ungetc(c).getsubscr().conclose()
+        call self.addcon('plugvar')
+        call self.ungetc(c)
+        call self.getsubscr()
+        call self.conclose()
     elseif c is# '@'
         return self.getchvar()
     elseif c is# '='
     elseif c is# '*'
         call self.getfunc()
     elseif c is# '$'
-        call self.addcon('evaluate').getvar().conclose()
+        call self.addcon('evaluate')
+        call self.getvar()
+        call self.conclose()
     elseif c is# '"'
-        call self.addcon('string', self.readstr()).conclose()
+        call self.addcon('string', self.readstr())
+        call self.conclose()
     elseif c is# "'"
-        call self.addcon('string', self.readsstr()).conclose()
+        call self.addcon('string', self.readsstr())
+        call self.conclose()
     elseif c is# '('
         call self.getvar()
         if self.readc() isnot# ')'
 " Input: {var} ( "(" ( "." | {var} | "," )* ")"? )?
 " Output: context(func, {var}, ({var}|context(this))*)
 function s:parser.getfunc()
-    call self.addcon('func').getvar()
+    call self.addcon('func')
+    call self.getvar()
     if self.len
         let c=self.readc()
         if c is# '('
                 if c is# ')'
                     break
                 elseif c is# '.'
-                    call self.addcon('this').conclose()
+                    call self.addcon('this')
+                    call self.conclose()
                 elseif c isnot# ','
-                    call self.ungetc(c).getvar()
+                    call self.ungetc(c)
+                    call self.getvar()
                 endif
             endwhile
         else
     elseif c is# '='
         call self.getexpr()
     else
-        call self.ungetc(c).intfunc()
+        call self.ungetc(c)
+        call self.intfunc()
     endif
     return self.conclose()
 endfunction
                 if c is# ')'
                     break
                 elseif c is# '.'
-                    call self.addcon('curval').conclose()
+                    call self.addcon('curval')
+                    call self.conclose()
                 elseif c is# '%'
-                    call self.addcon('curarg').conclose()
+                    call self.addcon('curarg')
+                    call self.conclose()
                 elseif c is# '#'
-                    call self.addcon('curidx').conclose()
+                    call self.addcon('curidx')
+                    call self.conclose()
                 elseif c isnot# ','
-                    call self.ungetc(c).getvar()
+                    call self.ungetc(c)
+                    call self.getvar()
                 endif
             endwhile
         else
     call self.addcon('arg')
     "▶2 Default value
     if type is# 'optional' && c is# ':'
-        call self.addcon('defval').getvar().conclose()
+        call self.addcon('defval')
+        call self.getvar()
+        call self.conclose()
         let c=self.readc()
     endif
     "▶2 Define variables used to determine how to handle second word
             call self.scanmsg()
         elseif (!hastext || accepttext) && c=~#'^\w'
             let hastext=1
-            call self.ungetc(c).intfunc()
+            call self.ungetc(c)
+            call self.intfunc()
             if !accepttext
                 break
             endif

File plugin/frawor/fwc/topconstructs.vim

         if c is# ']'
             break
         else
-            call self.ungetc(c).scan()
+            call self.ungetc(c)
+            call self.scan()
         endif
     endwhile
     return self.conclose()
             if hasnext
                 for opt in a:adescr.optional
                     call self.if(failstr)
-                                \.try()
-                                    \.pushms('throwignore')
-                                    \.compadescr(opt, a:idx.'.'.i.'(optional)',
+                    call        self.try()
+                    call         self.pushms('throwignore')
+                    call         self.compadescr(opt, a:idx.'.'.i.'(optional)',
                                     \            'check', 1)
-                                    \.popms()
-                                    \.let(failstr, 0)
-                                    \.let(a:caidxstr, self.getlastsub())
-                                \.catch(s:cfreg)
-                            \.endif()
+                    call        self.popms()
+                    call            self.let(failstr, 0)
+                    call            self.let(a:caidxstr, self.getlastsub())
+                    call        self.catch(s:cfreg)
+                    call    self.endif()
                     let self.subs[-1]=[a:caidxstr]
                     let i+=1
                 endfor
             for opt in a:adescr.optional
                 let savedcaidxstr=self.getlvarid('savedcaidx')
                 call self.let(savedcaidxstr, a:caidxstr)
-                        \.compadescr(opt, a:idx.'.'.i.'(optional)', a:type, 0)
-                        \.let(a:caidxstr, savedcaidxstr)
+                call self.compadescr(opt, a:idx.'.'.i.'(optional)', a:type, 0)
+                call self.let(a:caidxstr, savedcaidxstr)
                 let self.subs[-1]=[a:caidxstr]
                 let i+=1
             endfor
     endif
     let addedsavemsgs=1
     call self.addsavemsgs()
-                \.try()
-                    \.pushms('throw')
-                    \.compadescr(a:adescr.optional[0], a:idx.'.0(optional)',
+    call        self.try()
+    call            self.pushms('throw')
+    call            self.compadescr(a:adescr.optional[0], a:idx.'.0(optional)',
                     \            a:type, (a:purgemax || a:adescr.maximum==-1))
-                    \.popms()
-                    \.addrestmsgs(1)
+    call            self.popms()
+    call            self.addrestmsgs(1)
     if lopt>1
         call self.let(failstr, 0)
     endif
                             \            a:caidxstr.')')
             endfor
             let ldefaults=len(self.defvals)
-            call     self.increment(a:caidxstr, ldefaults)
-                        \.increment(a:largsstr, ldefaults)
+            call self.increment(a:caidxstr, ldefaults)
+            call self.increment(a:largsstr, ldefaults)
         endif
     endif
     call self.up()
         let i=1
         for opt in a:adescr.optional[1:]
             call self.if(failstr)
-                        \.try()
-                            \.pushms('throw')
-                            \.compadescr(opt,a:idx.'.'.i.'(optional)',a:type,0)
-                            \.popms()
-                            \.addrestmsgs(1)
-                            \.let(failstr, 0)
+            call        self.try()
+            call          self.pushms('throw')
+            call          self.compadescr(opt,a:idx.'.'.i.'(optional)',a:type,0)
+            call          self.popms()
+            call          self.addrestmsgs(1)
+            call          self.let(failstr, 0)
             let newsub=self.getlastsub()
             if newsub isnot# a:caidxstr
                 call self.let(a:caidxstr, newsub)
             endif
             call self.catch(s:cfreg)
-                \.endif()
+            call self.endif()
             let self.subs[-1]=[a:caidxstr]
             let i+=1
         endfor
 "                         "argnum": UInt }
 let s:defprefopts={'alt': 0, 'list': 0, 'opt': 0, 'argnum': 1}
 function s:r.prefixes.scan()
-    call self.addcon('prefixes').getomtchr()
+    call self.addcon('prefixes')
+    call self.getomtchr()
     let prevlen=-1
     while self.len && prevlen!=self.len
         let prevlen=self.len
                 call self.addsavemsgs()
                 let addedsavemsgs=1
             endif
-            call self.try().pushms('throw')
+            call self.try()
+            call self.pushms('throw')
         endif
         "▶3 Initialize variables inside constructed function
             call self.let(prefdictstr, '{}')
-                        \.call('insert('.base.', '.prefdictstr.', '.
-                        \                self.getsub(nextsub).')')
-                        \.increment(a:caidxstr)
-                        \.increment(a:largsstr)
+            call self.call('insert('.base.', '.prefdictstr.', '.
+                        \            self.getsub(nextsub).')')
+            call self.increment(a:caidxstr)
+            call self.increment(a:largsstr)
         "▶3 Add default values
         for [prefix, prefopts, defval; dummylist] in defaults
             call self.let(prefdictstr.self.getsubs([prefix]),
         endif
     else
         call self.addif(a:caidxstr.'=='.a:largsstr.'-1')
-                    \.setmatches(plstr, type([]), 1)
-                    \.break()
-                \.up()
+        call        self.setmatches(plstr, type([]), 1)
+        call        self.break()
+        call self.up()
     endif
     call self.let(astr, self.getmatcher(get(a:adescr, 'prefixesmatcher',
                 \                           s:prefdefmatcher), plstr,
         endif
         if !self.o.onlystrings
             if haslist
-                call self.up().else().let(astr, 0).up().endif()
-                            \.if(astr.' isnot 0')
+                call self.up()
+                call self.else()
+                call    self.let(astr, 0)
+                call self.up()
+                call self.endif()
+                call self.if(astr.' isnot 0')
             else
                 call self.nextthrow(astr.' is 0', 'pnf', idx, self.argstr())
             endif
             call self.call(removestr)
         endif
         if haslist
-            call self.up().endif()
+            call self.up()
+            call self.endif()
         endif
     else
         call self.addif(astr.' isnot 0')
-                    \.increment(a:caidxstr, 1)
-                \.endif()
+        call        self.increment(a:caidxstr, 1)
+        call self.endif()
     endif
     "▲3
     for [prefix, prefopts; args] in a:adescr.prefixes
         if a:type is# 'check' || a:type is# 'pipe'
             for i in range(1, prefopts.argnum)
                 call self.compilearg(args[i-1], idx.self.string(prefix), a:type)
-                            \.incsub()
+                call self.incsub()
             endfor
             if prefopts.argnum>0
                 call self.increment(a:largsstr, -prefopts.argnum)
             endif
             let idxdiffstr=self.getlvarid('idxdiff')
             call self.if(a:caidxstr.'+'.prefopts.argnum.'<'.a:largsstr)
-                        \.increment(a:caidxstr, prefopts.argnum)
-                    \.else()
-                        \.let(idxdiffstr, a:largsstr.'-'.a:caidxstr)
+            call        self.increment(a:caidxstr, prefopts.argnum)
+            call self.else()
+            call        self.let(idxdiffstr, a:largsstr.'-'.a:caidxstr)
             for i in range(1, prefopts.argnum)
                 call self.addif(idxdiffstr.'=='.i)
-                            \.compilearg(args[i-1], idx.self.string(prefix),
+                call        self.compilearg(args[i-1], idx.self.string(prefix),
                             \            a:type)
-                            \.break()
-                        \.up()
+                call        self.break()
+                call self.up()
             endfor
-            call self.up().up()
+            call self.up()
+            call self.up()
         endif
         "▶3 Move prefix arguments to prefix dictionary
         if a:type is# 'complete'
                 let cond.=' && type('.prefstr.')=='.type([])
             endif
             call self.if(cond)
-                        \.increment(prefstr, removestr)
-                    \.else()
-                        \.let(prefstr, removestr)
-                    \.up()
+            call        self.increment(prefstr, removestr)
+            call self.else()
+            call        self.let(prefstr, removestr)
+            call self.up()
             call self.let(lastliststr, prefixstr)
         else
             if haslist
         if a:type is# 'check' || a:type is# 'pipe'
             if prefopts.alt
                 call self.addif(astr.' is# '.self.string('no'.prefix))
-                            \.let(prefstr, 0)
-                            \.up()
+                call        self.let(prefstr, 0)
+                call        self.up()
             endif
         endif
         "▲3
     endfor
     if a:type is# 'complete'
         call self.addif(astr.' is 0')
-                    \.break()
-                \.up()
+        call        self.break()
+        call self.up()
     endif
     call self.up()
     if a:type is# 'check' || a:type is# 'pipe'
         if hasnext
-            call self.unlet(argorigstr).up().up().addrestmsgs(1).popms()
-                \.catch(s:cfreg)
-                    \.if('exists('.string(argorigstr).')')
-                        \.call('insert('.base.','.argorigstr.','.a:caidxstr.')')
-                        \.increment(a:largsstr)
-                    \.up()
-                \.up()
+            call self.unlet(argorigstr)
+            call self.up()
+            call self.up()
+            call self.addrestmsgs(1)
+            call self.popms()
+            call self.catch(s:cfreg)
+            call    self.if('exists('.string(argorigstr).')')
+            call     self.call('insert('.base.','.argorigstr.','.a:caidxstr.')')
+            call     self.increment(a:largsstr)
+            call    self.up()
+            call self.up()
         else
             call self.up()
         endif
             let condition=a:largsstr.'-1 == '.self.getlastsub()
         endif
         call self.addif(condition)
-                    \.compilearg(a:adescr.next[0], a:idx.'.(next)', a:type)
-                \.up()
+        call        self.compilearg(a:adescr.next[0], a:idx.'.(next)', a:type)
+        call self.up()
         if hasnext
             call self.pushms('throwignore')
-                        \.try()
-                            \.while(a:caidxstr.'<'.a:largsstr.'-1')
-                                \.compilearg(a:adescr.next[0], a:idx.'.(next)',
-                                \            'check')
-                                \.increment(a:caidxstr)
-                            \.up()
-                        \.catch(s:cfreg)
-                            \.call('remove('.self.vstrs[-1].', 0, -1)')
-                        \.up()
+            call        self.try()
+            call            self.while(a:caidxstr.'<'.a:largsstr.'-1')
+            call              self.compilearg(a:adescr.next[0], a:idx.'.(next)',
+                              \            'check')
+            call              self.increment(a:caidxstr)
+            call            self.up()
+            call        self.catch(s:cfreg)
+            call            self.call('remove('.self.vstrs[-1].', 0, -1)')
+            call        self.up()
         endif
     else
         if hasnext
                 call self.addsavemsgs()
                 let addedsavemsgs=1
             endif
-            call self.try().pushms('throw')
+            call self.try()
+            call self.pushms('throw')
         endif
         call self.while(a:caidxstr.'<'.a:largsstr)
-                    \.compilearg(a:adescr.next[0], a:idx.'.(next)', a:type)
-                    \.increment(a:caidxstr)
-                    \.up()
+        call        self.compilearg(a:adescr.next[0], a:idx.'.(next)', a:type)
+        call        self.increment(a:caidxstr)
+        call        self.up()
         if hasnext
-            call self.addrestmsgs(1).catch(s:cfreg).popms().up()
+            call self.addrestmsgs(1)
+            call self.catch(s:cfreg)
+            call self.popms()
+            call self.up()
         endif
     endif
     return [[a:caidxstr], addedsavemsgs]
 " Output: context(actions[, {matcher}],
 "                 (context(action, 0|String|{arg}, {arg}*))*)
 function s:r.actions.scan()
-    call self.addcon('actions').getomtchr()
+    call self.addcon('actions')
+    call self.getomtchr()
     let hasaction=0
     let prevlen=-1
     while self.len && prevlen!=self.len
                     if c is# ')'
                         break
                     endif
-                    call self.ungetc(c).scan()
+                    call self.ungetc(c)
+                    call self.scan()
                 endwhile
             elseif c isnot# '>' && c isnot# '-'
-                call self.ungetc(c).scan()
+                call self.ungetc(c)
+                call self.scan()
             endif
             call self.conclose()
         endif
     let noact=get(filter(copy(a:adescr.actions), 'v:val[0] is 0'), 0, 0)
     let fsastr=self.getfunstatvar('actions', map(copy(actions), 'v:val[0]'))
     if noact isnot 0 && a:type isnot# 'complete'
-        call self.try().pushms('throw')
+        call self.try()
+        call self.pushms('throw')
     endif
     let idx=a:idx.'(actions)'
     if !self.o.onlystrings && a:type isnot# 'complete'
     let curargstr=self.argstr()
     if a:type is# 'complete'
         call self.addif(a:largsstr.'-1 == '.self.getlastsub())
-                        \.setmatches(fsastr, type([]), 1)
+        call            self.setmatches(fsastr, type([]), 1)
         let savedsub=copy(self.subs[-1])
         if noact isnot 0 && len(noact)>1
             let self.onlyfirst+=1
-            call self.compadescr(noact[1], idx.'.nullact', a:type, 0).out()
+            call self.compadescr(noact[1], idx.'.nullact', a:type, 0)
+            call self.out()
             call call(s:r.actions.optimizenullact, [a:caidxstr], self)
             let self.onlyfirst-=1
         endif
             call self.compadescr(actargs[0], idx.'.'.self.string(actstr),
                         \        a:type, 0)
         endif
-        call self.let(a:caidxstr, self.getlastsub()).up()
+        call self.let(a:caidxstr, self.getlastsub())
+        call self.up()
         let self.subs[-1]=copy(astartsub)
     endfor
     if noact isnot 0
         if a:type is# 'complete'
             call self.else()
         else
-            call self.popms().catch(s:cfreg)
+            call self.popms()
+            call self.catch(s:cfreg)
         endif
         call self.incsub(-1)
         if len(noact)>1
             call self.compadescr(noact[1], idx.'.nullact', a:type, 0)
-                        \.let(a:caidxstr, self.getlastsub())
+            call        self.let(a:caidxstr, self.getlastsub())
         endif
         let self.subs[-1]=copy(astartsub)
-        call self.up().up()
+        call self.up()
+        call self.up()
     endif
     let self.subs[-1]=[a:caidxstr]
     if a:type is# 'complete'
-        call self.up().up()
+        call self.up()
+        call self.up()
     endif
     return [[a:caidxstr], a:addedsavemsgs]
 endfunction

File test/copyout-postproc.zsh

+#!/bin/zsh
+function copostproc()
+{
+    [[ ${PREFIX[-4,-1]} == wine ]] && local -x TMPDIR='T:'
+    perl -p -i -e 's/\Q$ENV{"TMPDIR"}\E/%TMPDIR%/g' $1
+}
+copostproc $@

File test/fwccheck.ok

 plugin/frawor/fwc/compiler:nosign
 sign Bar text=<>
 sign 1 text=<>
-sign 1 text=<>
 ::: Section <Checks/Built-in checks/type>
 plugin/frawor/fwc/compiler:typefail
 plugin/frawor/fwc/compiler:typefail

File test/fwccompletetests-withredir.dat

 #▶1 idof
 :command -nargs=1 WriteFile W <args>
 :sign define usersign text=<>
-:sign define 0001 text=<>
+:sign define 1 text=<>
 :augroup Test | augroup END
 `idof variable
   @testf

File test/fwctests.dat

 #▶3 idof
 :augroup Foo | augroup END
 :sign define Bar text=<>
-:sign define 0001 text=<>
+:sign define 1 text=<>
 ['idof var',       'check'], [0],           0
 ['idof var',       'check'], ['outfile'],   0
 ['idof var',       'check'], ['g:outfile'], 1
 ['idof sign',      'check'], ['*'],         0
 ['idof sign',      'check'], ['0'],         0
 ['idof sign',      'check'], ['Bar'],       1
-['idof sign',      'check'], ['001'],       1
 ['idof sign',      'check'], ['1'],         1
 #▶3 type
 ['type string',     'check'], [''],                 1