Commits

ZyX_I  committed f5acae8

@/fwc/compiler: Replaced some double strikes with single ones

  • Participants
  • Parent commits 7977b22

Comments (0)

Files changed (1)

File plugin/frawor/fwc/compiler.vim

 function s:F.string(str)
     return substitute(substitute(substitute(string(a:str),
                 \"\n",     '''."\\n".''', 'g'),
-                \"^''\\.", "",            ""),
-                \"\\.''$", "",            "")
+                \"^''\\.", '',            ''),
+                \"\\.''$", '',            '')
 endfunction
 "▶1 add            :: item, ... + self → self + self
 function s:constructor.add(...)
                 let sq[arg[0]]=[]
             endif
             if arg[0] is 'actions' || arg[0] is 'prefixes'
-                if get(get(arg, 1, []), 0, "") is 'matcher'
+                if get(get(arg, 1, []), 0, '') is 'matcher'
                     let sq[arg[0].'matcher']=remove(arg, 1)[1:]
                 endif
                 call extend(sq[arg[0]], filter(map(arg[1:], 'v:val[1:]'),
 endfunction
 "▶1 substostr      :: [subscript] → String
 function s:F.substostr(subscripts)
-    let r=""
+    let r=''
     for subs in a:subscripts
         let tsubs=type(subs)
-        if tsubs==type("")
+        if tsubs==type('')
             if subs=~#'^\w\+$'
                 let r.='.'.subs
             else
 endfunction
 "▶1 compilestring  :: {string} + self → self + self
 function s:constructor.compilestring(str)
-    if type(a:str)==type("")
+    if type(a:str)==type('')
         return s:F.string(a:str)
     endif
     return self.getvar(a:str)
         let desc=a:pipe[1][1:]
         if desc[0] is 'substitute'
             call self.add('let '.curargstr.'=substitute('.curargstr.', '.
-                        \((type(desc[1][1])==type(""))?
+                        \((type(desc[1][1])==type(''))?
                         \       (s:F.string(desc[1][1])):
                         \       (self.getvar(desc[1][1]))).', '.
                         \join(map(desc[2:], 'self.compilestring(v:val)'), ', ').
                                 \       'keysmis', idx, '@#@',
                                 \                  'join('.absentkeys.', ", ")')
                 elseif !empty(desc[1])
-                    let keystr=((type(desc[1][0])==type(""))?
+                    let keystr=((type(desc[1][0])==type(''))?
                                 \       (s:F.string(desc[1][0])):
                                 \       (self.getvar(desc[1][0])))
                     call self.nextthrow('!has_key('.curargstr.', '.keystr.')',
                     call self.nextthrow('!((type('.curargstr.')==2 && '.
                                 \         'exists('.string('*'.curargstr).')&&'.
                                 \          frefpref.' isnot "s:") '.
-                                \        '|| (type('.curargstr.')=='.type("").
+                                \        '|| (type('.curargstr.')=='.type('').
                                 \            '&& '.curargstr.'=~#'.
                                 \             '''\v^%(%([sla]@!\w:)?%(\w|\.)+|'.
                                 \                    '%(s@!\w:)?\w+)$'''.
             elseif desc[0] is 'match'
                 let addedcond=1
                 call self.addtypecond([type('')], idx)
-                let regex=((type(desc[1][1])==type(""))?
+                let regex=((type(desc[1][1])==type(''))?
                             \(s:F.string(desc[1][1])):
                             \(self.getvar(desc[1][1])))
                 call self.nextthrow(curargstr.'!~#'.regex,
                     let squashedlen=0
                     call remove(check, 1, -1)
                 endif
-                call call(self["compile".proc[0]], [proc, i], self)
+                call call(self['compile'.proc[0]], [proc, i], self)
                 let i+=1
             endfor
             if len(check)>1