SpaceManiac / SpacemanDMM

A BYOND language smartness provider, map renderer, and more.
https://marketplace.visualstudio.com/items?itemName=platymuus.dm-langclient
GNU General Public License v3.0
79 stars 78 forks source link

"lint" program errors out on bracket syntax defining multiple vars #45

Open DamianX opened 5 years ago

DamianX commented 5 years ago

https://github.com/vgstation-coders/vgstation13/blob/42f7caab216e5140b502b1f46283a8a5ff08c774/code/__HELPERS/unsorted.dm#L1332

var icon{result = icon(base); temp}
code/__HELPERS/unsorted.dm, line 1332, column 10:
error: got '{', expected one of: '/', '[', '=', as, 'in', ',', ';'
DamianX commented 5 years ago

Actually, it seems to not like multiple vars declared like that in general, even without the brackets. https://github.com/vgstation-coders/vgstation13/blob/42f7caab216e5140b502b1f46283a8a5ff08c774/code/modules/flufftext/TextFilters.dm#L79-L81

var/list
    words = splittext(original_msg," ")
    new_words = list()
code/modules/flufftext/TextFilters.dm, line 79, column 11:
error: got '{', expected one of: '/', '[', '=', as, 'in', ',', ';'
SpaceManiac commented 5 years ago

Hmm, I thought I had implemented this, but I guess not. It should only take one fix to handle both braces and indentation; indentation is converted to braces at an earlier stage in the parse.