luke-gru / riml

Riml is a subset of VimL with some nice added features. It compiles to plain VimL.
MIT License
224 stars 6 forks source link

bug in boolean assignment #32

Open tek opened 10 years ago

tek commented 10 years ago

When using this assigment syntax:

foo = bar != 0

riml creates

if bar !=# 0
  let foo = 1
else
  let foo = 0
endif

First of all, let foo = bar != 0 is valid VimL and seems to work fine. The real problem I encountered is that in a (defm) method definition, the complete rest of the method body is being ignored…the next line becomes an "endfunction". Putting parentheses around the bar != 0 fixes things (though by preventing the expansion to the above).