Source

frawor / autoload / frawor / functions.vim

Diff from to

File autoload/frawor/functions.vim

                     \                 '|| v:val<0'))
             call s:_f.throw('1nver', a:fname, a:plugdict.id)
         endif
-        call a:plugdict.g._f.require(a:funopts.function[0],
-                    \                a:funopts.function[1], 1)
-        if !has_key(s:aufunctions, a:funopts.function[0])
-            call s:_f.throw('nodep', a:fname, a:plugdict.id,
-                        \   a:funopts.function[0])
-        elseif !has_key(s:aufunctions[a:funopts.function[0]].functions,
-                    \   a:funopts.function[2])
+        let dplid=a:plugdict.g._f.require(a:funopts.function[0],
+                    \                     a:funopts.function[1], 1, 1)
+        if !has_key(s:aufunctions, dplid)
+            call s:_f.throw('nodep', a:fname, a:plugdict.id, dplid)
+        elseif !has_key(s:aufunctions[dplid].functions, a:funopts.function[2])
             call s:_f.throw('nofun', a:fname, a:plugdict.id,
-                        \   a:funopts.function[2], a:funopts.function[0])
+                        \   a:funopts.function[2], dplid)
         endif
-        let funopts=s:aufunctions[a:funopts.function[0]].functions
-        let fundefext=s:F.fundef(s:aufunctions[a:funopts.function[0]].plugdict,
-                    \            funopts, fundefext, a:fname)
+        let funopts=s:aufunctions[dplid].functions[a:funopts.function[2]]
+        let fundefext=s:F.fundef(s:aufunctions[dplid].plugdict, funopts,
+                    \            fundefext, a:fname)
         call extend(decdeps, fundefext.decdeps)
-        let sid=s:aufunctions[a:funopts.function[0]].sid
+        let sid=s:aufunctions[dplid].sid
     else
         let sid=a:plugdict.sid
     endif
                 \'plid': a:plugdict.id,}
     let fdicts.nextid+=1
     let fdicts[fundef.id]=fundef
-    "▶2 Add `function' key
     let fundef=s:F.fundef(a:plugdict, a:funopts, fundef, a:fname)
-    "▲2
-    let decs=map(filter(keys(a:funopts), 'v:val[0] is# "@"'),
+    let decs=map(filter(keys(fundef), 'v:val[0] is# "@"'),
                 \'s:_r.getdecorator(v:val[1:])')
     if empty(decs) && fname is# 'fundef.cons'
         let fundef.cons=fundef.function
             let decplugdict=fundef.decdeps[decorator.id]
             "▶2 Check existance of decorator definer in dependencies
             if !has_key(decplugdict.dependencies, decorator.plid)
-                call s:_f.throw('decndep', a:fname, a:plugdict.id,
-                            \              decorator.id)
+                call s:_f.throw('decndep', a:fname, a:plugdict.id, decorator.id)
             endif
             "▲2
             call add(fblocks, decorator.func(decplugdict, fname,
-                        \                    a:funopts['@'.decorator.id]))
+                        \                    fundef['@'.decorator.id]))
             "▶2 Check decorator return value
             if type(fblocks[-1])!=type([])
                         \|| len(fblocks[-1])!=6