/lua-comment-cleaner

A Python script to remove comments from Lua files.

Primary LanguagePython

Lua Comment Cleaner

lua-comment-cleaner is a Python script that removes single-line and multi-line comments from Lua files while preserving the code structure and indentation.

  • Supports removing nested multi-line comments with different levels of equal signs between the brackets.

Usage

  1. Clone this repository or download the clean_comments.py file.
git clone https://github.com/DiNaSoR/lua-comment-cleaner.git
  1. Place the clean_comments.py script in the same directory as the Lua file you want to clean.

  2. Run the script, specifying the input Lua file and the output file.

python clean_comments.py input.lua output.lua

Replace input.lua with the name of your Lua file and output.lua with the desired output file name.

License

This project is licensed under the MIT License. See the LICENSE file for details.