#{ code region }#

Case number:671071-997979
Topic:Game: Other
Opened by:StackOverflow
Status:Open
Type:Suggestion
Opened on:Friday, June 13, 2014 - 05:20
Last modified:Sunday, June 15, 2014 - 21:25

Could you please have the lua interpreter (or a filter before it)
ignore any lines starting with #{ or #}

by doing this, external code editors like Notepad++ can have code regions setup, making our scripts much neater by categorising and compacting our functions. They should just be considered comments

example:

#{ Core Script
function main()
--blah
end
#}

#{ Math Library
function add()
-- blah
end
#}

(Fri, 06/13/2014 - 05:20  |  2 comments)


brow42's picture
User offline. Last seen 8 weeks 6 days ago. Offline
Joined: 09/19/2011
Groups: None

Try using --[[ and --]] for comment blocks. Also, set Notepad++ to Lua syntax.

Joined: 09/21/2011
Groups: Void Crushers

Or use the next sed call (if you have unix or cygwin) to strip any line starting with #:
sed -e "s/^#.*//"

Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons