Commits

ZyX_I  committed d2ab323

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

Workaround for the vim bug described in
https://groups.google.com/forum/#!topic/vim_dev/1M7UMk-E1to

  • Participants
  • Parent commits a909589
  • Tags release-0.2.3

Comments (0)

Files changed (3)

File autoload/frawor/decorators/altervars.vim

     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

 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

                 \                   (1))
         let id=a:1
     else
-        let id=printf('%x', self.vids[a:name])
+        let id=printf('x%x', self.vids[a:name])
         let self.vids[a:name]+=1
     endif
     let self.vars[a:name][id]=a:init
 endfunction
 "▶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))
 endfunction
 "▶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