Jump to content




luapp -- A Lua Preprocessor


4 replies to this topic

#1 Admicos

  • Members
  • 207 posts
  • LocationTurkey

Posted 19 October 2016 - 03:48 PM

luapp is a Lua preprocessor. Yeah.

USAGE

luapp <args> <filename>


DOCS

Can be found here


DOWNLOADS

pastebin: Y39vjirG (requires getopt)

packman: admicos/luapp (recommended, will get getopt with it)

git: https://github.com/admicos/luapp (also includes non-computercraft versions)


Edited by Admicos, 11 November 2016 - 05:20 PM.


#2 Admicos

  • Members
  • 207 posts
  • LocationTurkey

Posted 05 November 2016 - 07:16 AM

luapp has been updated to 1.1.0!, new additions:
  • --pp:ifdef definition: Similar to a ignore zone, but ignores if "definition" is not defined
  • --pp:ifndef definition: Reverse of "ifdef"
  • --pp:if "lua expression": Similar to a ignore zone but ignores if "lua expression" returns false
  • --pp:ifn "lua expression": Reverse of "if"
  • --pp:else: Reverses a ignore zone.
  • Fixed preprocessor commands running on ignore zones.
Here is a example of the ifs
--pp:if 1 == 1
print("1 equals 1!")
--pp:ignoreend

--pp:define DO_PRINT_THAT true

--pp:ifdef DO_PRINT_THAT
print("dpt is defined")
--pp:ignoreend

--yes, ifs also allow the defines with the lua code.

--pp:if DO_PRINT_THAT
print("dpt on")
--pp:else
print("dpt off")
--pp:ignoreend

Edited by Admicos, 05 November 2016 - 07:36 AM.


#3 Admicos

  • Members
  • 207 posts
  • LocationTurkey

Posted 05 November 2016 - 06:15 PM

luapp has been updated to 1.2.0, which now includes:
  • The --pp:include command will now look at the following directories for includeable files:

/etc/luapp/include

Current directory

Root of the filesystem


/etc/luapp/include is for global includes that you can redistribute with your API, current directory was the default and the root of the filesystem is just an extra.

Edited by Admicos, 05 November 2016 - 06:36 PM.


#4 Admicos

  • Members
  • 207 posts
  • LocationTurkey

Posted 07 November 2016 - 03:44 AM

luapp will (with a optional setting) now work with the official lua5.1 cli so you can use it for non-Computercraft programs!

#5 Admicos

  • Members
  • 207 posts
  • LocationTurkey

Posted 11 November 2016 - 05:11 PM

luapp has been updated to 1.3.0, changelog here





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users