lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Date: Sun, 28 Jan 2018 09:02:24 -0600
> From: Paige DePol <lual@serfnet.org>
> Subject: Desired Lua Features 
> To: Lua mailing list <lua-l@lists.lua.org>
> Message-ID: <25A332F5-3337-4AFB-B639-0EF75106FD8E@serfnet.org>
> 
> So, if you could add any one feature to Lua right now, what would that
> feature be and why would you want to see it added?

I'd like something with the functionality of the C-preprocessor's #line directive.

I added a simple version of that (it accepts but doesn't handle filenames) with the syntax:
	@N F
where the @ must be in column 1, N is a line number, and F is an optional filename.

Why do I want it?  I've been writing code generators for Lua and being able to trace errors
back to the input, an input template, or a bug in the code generator is incredibly useful; if
it's standardized the debuggers would (hopefully) support it which would make it even more
useful.

Also +1 for switch.

Thanks,
Ken Lorber