reuh / candran Goto Github PK
View Code? Open in Web Editor NEWa Lua dialect and simple preprocessor
License: MIT License
a Lua dialect and simple preprocessor
License: MIT License
Would be useful to have available on the command line:
Any plans to add macro support?
Something that would make syntax like this possible:
#ifdef _DEBUG
#define log(self, ...) self:log(...)
#else
#define log(self, ...) -- ...
#endif
I feel that would be alot more powerful than conditionals alone
Because lexer.lua parse the "--" as a comment.
lpeglabel
requires compilation, and support for native modules, while there are several alternative lua implementations, such as gopher-lua, which don't support compiled native modules
although I don't know of any pure-lua lpeglabel
implementations, there are a couple of lua-based lpeg
implementations, though, such as LuLPeg(emulates LPeg v0.12) and LPegLJ(LPeg v1.0, but for LuaJIT 2.x, so doesn't really count)
my use-case would be with Algernon web server, which embeds gopher-lua
, so I don't need to also have a separate copy of "normal lua" to use candran with
Lune currently only work on Lua 5.2. It would be nice if it was compatible with Lua 5.1 (and LuaJit).
$ canc -h
Candran 0.14.0 compiler by Reuh
Usage: /usr/local/lib/luarocks/rocks-5.1/candran/0.14.0-1/bin/canc [options] filenames...
Use - instead of filenames to read from the standard input. The output file will be named stdin.lua by default.
Compiler options:
dest="directory" where compiled files should be written
out="name.lua" output filename. By default, will use the same name as the input file with a .lua extension.
-print write to the standard output instead of creating files
-preprocess only run the preprocessor
-compile only run the compiler
-parse only parse the file and prints errors to stdout
-ast (for debugging purposes) only parse the files and dump the AST to stdout
-help or -h print this text
Default options:
/usr/bin/lua5.1: ...cal/lib/luarocks/rocks-5.1/candran/0.14.0-1/bin/canc:26: bad argument #2 to 'format' (string expected, got boolean)
stack traceback:
[C]: in function 'format'
...cal/lib/luarocks/rocks-5.1/candran/0.14.0-1/bin/canc:26: in main chunk
[C]: ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.