3 ms·
Commenting and uncommenting blocks in lua: --[[ commented = 123 --]] ---[[ uncommented = 456 --]] Commenting and uncommenting blocks by adding or
by Vaskivo 9y ago
Commenting and uncommenting blocks in lua:
--[[
commented = 123
--]]
---[[
uncommented = 456
--]]
Commenting and uncommenting blocks by adding or removing a '-'. Pretty handy for trying stuff out.
https://www.lua.org/pil/1.3.html https://www.lua.org/pil/1.3.html
- lucozade 9y agolua also allows you to define blocks like [=[ ... ]=] but with arbitrary, matching counts of '=' inside. Using this style with your comment syntax handles having nested and/or dangling comment delimiters in the body. It's probably the most comprehensive approach I've used. In practice, I've never actually needed more than one level of nesting or dangling but it's not particularly onerous to the parser to include the arbitrary levels.