Commits

ZyX_I committed b366310

@/fwc/compiler: Fixed `not' inside `either'

  • Participants
  • Parent commits 6e61ce3

Comments (0)

Files changed (3)

File plugin/frawor/fwc/compiler.vim

                         \.pushms('throwignore')
                         \.compilearg(desc[1], a:idx.'(not)')
                         \.popms()
-                        \.addthrow('notfail', a:idx, '@#@')
+                        \.throw("'NOTFAIL'")
                     \.catch(s:cfreg).up()
+                    \.catch('\v^NOTFAIL$')
+                        \.addthrow('notfail', a:idx, '@#@').up()
         "▶3 `either'
         elseif desc[0] is 'either'
             let sucstr=self.getlvarid('succeeded')

File test/fwccheck.ok

 plugin/frawor/fwc/compiler:nbool
 plugin/frawor/fwc/compiler:typefail
 plugin/frawor/fwc/compiler:nbool
+plugin/frawor/fwc/compiler:eitherfail
+plugin/frawor/fwc/compiler:notfail
+plugin/frawor/fwc/compiler:isnot
 ::: Section <Checks/Built-in checks/list>
 plugin/frawor/fwc/compiler:typefail
 plugin/frawor/fwc/compiler:nreg

File test/fwctests.dat

 ['either bool, isreg',      'check'], [2],             0
 ['either bool, isreg',      'check'], [0],             1
 ['either bool, isreg bool', 'check'], [0, 2],          0
+['either not bool, is=1',   'check'], [0],             0
+['either not bool, is=1',   'check'], [1],             1
+['either not bool, is=1',   'check'], [2],             1
 #▶3 list
 ['list isreg',              'check'], ["['abc']"],     0
 ['list isreg',              'check'], [['abc']],       1