1. ZyX_I
  2. frawor


ZyX_I  committed d2ab323

Do not allow any generated with %x identifiers start with a number.

Workaround for the vim bug described in

  • Participants
  • Parent commits a909589
  • Branches default
  • Tags release-0.2.3

Comments (0)

Files changed (3)

File autoload/frawor/decorators/altervars.vim

View file
     let laltvars=len(a:arg)
     let plid=a:plugdict.id
     let i=0
-    let id=printf('%x', s:altervars.lastid)
+    let id=printf('x%x', s:altervars.lastid)
     let fpref='@%@.altervars.'.id
     let altcopy=map(copy(a:arg), 'copy(v:val)')
     let s:altervars[id]=altcopy

File autoload/frawor/functions.vim

View file
 function s:F.wrapfunc(plugdict, funopts, fundictsname, fname)
     let fname=a:fname
     let fdicts=s:{a:fundictsname}
-    let fundef =  {'id': printf('%x', fdicts.nextid),
+    let fundef =  {'id': printf('x%x', fdicts.nextid),
                 \'name':   fname,
                 \'plid': a:plugdict.id,}
     let fdicts.nextid+=1

File autoload/frawor/fwc/compiler.vim

View file
                 \                   (1))
         let id=a:1
-        let id=printf('%x', self.vids[a:name])
+        let id=printf('x%x', self.vids[a:name])
         let self.vids[a:name]+=1
     let self.vars[a:name][id]=a:init
 "▶1 getlvarid       :: varname + self → varname
 function s:compiler.getlvarid(v)
-    return printf('@$@%s%X', a:v, len(self._stack))
+    return printf('@$@%sx%X', a:v, len(self._stack))
 "▶1 getulvarid      :: varname + self → varname
 function s:compiler.getulvarid(v)
-    let lvarid=printf('@$@%s%X', a:v, len(self._stack))
+    let lvarid=printf('@$@%sx%X', a:v, len(self._stack))
     let i=0
     while has_key(self.lvars, printf('%s_%X', lvarid, i))
         let i+=1