Commits

ZyX_I committed 7323fe1

@fwc/constructor: Made self.continue and self.break go up one level.

Comments (0)

Files changed (4)

     1.1: Made block compiling functions be located in self._comp now
     2.0: Renamed self.tree and self.stack to self._tree and self._stack
     3.0: Renamed self.l to self._l
+    3.1: Made self.continue and self.break go up one level.
 @/os:
     0.1: Added |frawor-r-os.path.relpath|
          Made |frawor-r-os.path.normpath| also simplify its argument

plugin/frawor/fwc/constructor.vim

 "▶1 Header
 scriptencoding utf-8
-execute frawor#Setup('3.0', {'@/resources': '0.0'}, 1)
+execute frawor#Setup('3.1', {'@/resources': '0.0'}, 1)
 let s:constructor={}
 let s:comp={}
 let s:constructor._comp=s:comp
 endfunction
 "▶2 continue   :: &self
 function s:constructor.continue()
-    return self._out()._deeper('do', 'continue')._up()
+    return self._out()._deeper('do', 'continue')._up()._up()
 endfunction
 "▶2 break      :: &self
 function s:constructor.break()
-    return self._out()._deeper('do', 'break')._up()
+    return self._out()._deeper('do', 'break')._up()._up()
 endfunction
 "▶2 do         :: &self(vimLstr)
 function s:constructor.do(str)

plugin/frawor/fwc/intfuncs.vim

     let msglenstr=self.getlvarid('msglen')
     let pmsglenstr=self.getlvarid('pmsglen')
     let hascheck=0
+    let hasany=0
     let i=-1
     for check in a:dic[1][1:]
         let i+=1
         elseif check[0] is# 'expr'
             call self.addif(self.getexpr(check[1], keystr).' isnot 0')
         elseif check[0] is# 'any'
+            let hasany=1
             call self.compilearg(check[1], a:idx.'.'.i.'(val)', a:type)
             call self.continue()
             break
             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)
         call self.continue()
-        call self._up()
     endfor
     if hascheck
         call remove(self.msgs.savevars, -1)
     endif
-    call self.addthrow('keynmatch', 1, a:idx, keystr)
+    if !hasany
+        call self.addthrow('keynmatch', 1, a:idx, keystr)
+    endif
     call remove(self.subs, -1)
     return self
 endfunction
     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()

plugin/frawor/fwc/topconstructs.vim

         call self.addif(a:caidxstr.'=='.a:largsstr.'-1')
         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,
                             \            a:type)
                 call        self.increment(a:caidxstr, idxdiffstr)
                 call        self.break()
-                call self._up()
             endfor
             call self._up()
             call self._up()
     if a:type is# 'complete'
         call self.addif(astr.' is 0')
         call        self.break()
-        call self._up()
     endif
     if a:type is# 'check' || a:type is# 'pipe'
         if hasnext
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.