This is a lua syntax high-lighter. Because of a lot of memory problems caused by string concatenation and garbage collecting, these function use a trick to allocate a big string. It is a special print() function which override the standard print. This function is call by a special dostring() called dostring_print(). Print function executed via the dostring_print() will be concatenate in a buffer. Supplemental parameters allow to control the initial size of the final string and the reallocation policy. In an other hand, the syntax highlight have different level of details. For more information have a look to the lua_color_frag_size documentation.
Files | |
file | lua_colorize.lua |
LUA source colorizer. | |
Functions | |
luacolor_codeflow_change (var flow, var newmode) | |
luacolor_dump_codeflow (var flow) | |
luacolor_codeflow_simple (var flow) | |
luacolor_codeflow (var flow) | |
luacolor_mode (var flow, var mode) | |
Change lua colorizer machine state. | |
luacolor_file_wrap (var fname) | |
Did we change mode ? If we have an old mode ? Convert a lua source file into colored zml. | |
luacolor_file (var fname) | |
Variables | |
boolean | lua_color_key_words [keyword] |
LUA keywords. | |
number | lua_color_frag_size |
Fragment size in bytes for colorization auto-leveling. | |
color | lua_color_cod |
color used for code (default color). | |
color | lua_color_kwd |
color used for keyword. | |
color | lua_color_rem |
color used for comment. | |
color | lua_color_str |
color used for string. | |
color | lua_color_fnm |
color used for function name. | |
color | lua_color_fdf |
color used for function definition. | |
color | lua_color_pct |
color used for punctuation. | |
color | lua_color_digit |
color used for number. | |
string | lua_color_line_number |
Line number format string (nil for none). | |
number | lua_color_max_line |
Maximum number of line. |
|
Did we change mode ? If we have an old mode ? Convert a lua source file into colored zml.
|
|
Fragment size in bytes for colorization auto-leveling. In order to save memory, the syntax highlight of lua source have used different level of details with a maximum of features for files which size is less than the lua_color_frag_size value. Each level step is a block twice larger, which means that the file less than 2 times lua_color_frag_size have a medium level syntax highlight, 4 times have a minimum syntax highlight, 8 times are just formatted and largest files are discarded. The default value is 16Kb so you may see all decent lua source file with a nice render and the maximum limit is 128Kb which is more than usual size for source code ! |
dcplaya documentation version 2.0 | Generated on November 2004 by doxygen 1.3.6 |