demonnic / muddler

A build tool for Mudlet package developers
MIT License
40 stars 12 forks source link

Request: allow for an alternative to @PKGNAME@ which is a valid lua identifier #28

Closed wbk closed 2 years ago

wbk commented 2 years ago

Use case

I've been using @PKGNAME@ as a prefix to namespace any globals I create, but because @ symbols are not valid inside of lua identifiers, this does not sit well with the language server in vscode:

image

I suggest an alternative syntax allowing double-underscores (__) to replace the @ symbols anywhere this global search and replace happens, so that

__PKGNAME__ is equivalent to @PKGNAME@; and such that if my package is named Foo, then __PKGNAME___bar will transpile to Foo_bar within generated mudlet lua scripts.

image
demonnic commented 2 years ago

In new 1.0.0 release =)