Repository navigation
Releases: ErwanBarbedor/Plume_-_TextEngine
Release list
0.13.0
Changes
- Rename
plume.exporttoplume.register_macro. - Parameters of
plume.register_macroare no longer rendered before the macro call. - Plume will now work seamlessly with Lua local variables. Remove
plume.capture_local. plume.getaccept a second argumentannotationplumevariable is now local
Bugfixes
- Fix a bug occurring when globally setting a variable defined locally, but with a nil value.
0.12.0
Changes
- New syntax: conversion annotation. In the macro definition, users can give the name of a function to call on a parameter to convert it:
\macro double [x:number] ${2*x} - Default annotation to all parameters is
auto, even if old default behavior isref. - New
config.default_annotation. - New
plume.set,plume.local_setandplume.lset. - Rename
plume.lua_gettoplume.get_lua - Remove
plume.lget - All warnings are now disables by default.
- New
api.warnings_all() token:sourceLua(), tokenlist:sourceLua()->token:source_lua(), tokenlist:source_lua()- Sugar syntax :
\foo[?bar]is a shortcut for\foo[{\if $bar bar}]
Enhancements
- Betters error message for internals errors.
Interns changes
- Code cleaning
Deprecation
tokenlist:is_empty ()is deprecated- All tokenlist implicit conversions will be removed in the future.
CLI changes
- New
-w, --warningsoption
Bugfixs
- Fix a bug causing non-provided flags to be
nilinstead offalse. - Preventing a file from including itself with the macro
\include, or creating an infinite loop.
0.11.3
Bugfix
- Fix a case when
${10.0}output. - Fix an error in documentation generation.
- Fix an error causing Lua comment to remove the end line, causing syntax errors.
- Fix a bug causing the ignoring of a local variable with a nil value and getting instead the parent value.
- Fix a bug occurring when trying to require a directory.
- Fix a bug causing external file Lua error to be treated as Plume internal errors.
Enhancements
- A rendered flag that is empty doesn't raise an error anymore.
- If a rendered flag is provided, trim spaces before checking if this flag exists.
- Add a warning when globally editing
evaldefault parameters.
0.11.2
Enhancement
- Macro name suggestion in case of error like using "foo_bar" instead of "bar_foo", or "fooBar" instead of "barFoo".
- New error message when trying to include a directory.
- In error messages, cut lines if they are too long.
- Better error messages in case of Lua syntax error raised by Plume parser.
Bugfix
- When giving a path directory to include, first try to open
path/init.plumebefore trying to openpath. - Fix a bug preventing access to a local variable if its value is
false.
0.11.1
Changes
- Plume will no longer print output by default.
- Rewrite the Linux launcher. You can choose the Lua executable by setting the
LUA_EXECenvironnement variable.
Bugfix
- Fix a bug specific to Linux.
- Fix an error occurring when trying to open a file in the same folder.
- Fix an error occurring when giving an unknown flag to the
evalmacro.
0.11.0
Changes
- As planned,
\for,\if,\whileand\elseiffirst parameters must now be lua blocks. - Remove
_L, too complex to implement without being useful. - No need anymore to escape
$or braces inside lua string. Escaped$or braces will now raise an error. - Can now use
returninside a lua block. - In consequence, remove
plume.write. - Can now use arbitrary complexe lua iterator in the
\formacro. - Token implicit conversion now only works if used with string methods or operators.
Enhancement
- Plume should now detects if a Lua block is a statement or an expression without error.
- More pertinent suggestions in case of unknown macro or parameter.
- More coherent error messages.
- Resetting Plume is much faster.
- More accurate spaces filtering.
Internal changes
- Rewrite unitary testing: cleaner code and much clearer output.
- Rewrite tokenizer. Cleaner and now context-sensitive
- Move somme parts of render to parser.
- Write a limited lua parser.
- Move errors message to dedicateds files.
- A lot of other code rewriting, cleaning, and comments added.
0.10.0
- As planned, remove compatibilty for old syntax
#and\\ - As planned, remove compatibilty for old configuration
config.ignore_spaces
0.9.0
Changes
- Plume is no longer a standalone Lua file.
- As planned, remove
\def,\defl,\def_local,\setl,\set_local,\default_local,\alias_local,\aliasl,\redefand\redef_forced.
CLI
Changes
- New option
-c --configto edit configuration before executing the file or the given code.
Enhancements
- Rewrite doc
- New tests specifics to CLI
Fixes
- No longer see the first error message for each error.
- Fixe an error preventing to see plume output.
- Error is now writted on stderr, not stdin.
0.8.0
Changes
- Can now use
${...}in parameter names and parameter values. - Configuration can now be local.
${...}[i]will now round, not floor.- New option for CLI: interactive mode
- New function
plume.is_called_by. - New function
plume.write. - New
plume.engine - Add a warning if using
#or//instead of$and\--. Will be triggered in Lua code, ignore it in this case. - Remove
plume._LUA_VERSION. (the Lua version is already inplume._VERSION) - Remove implicit render on
token.__eq - Remove access to the Lua table
argfrom plume.
Enhancement
- When an error occurs in a Lua-defined macro, the line will no longer be printed twice in the error message.
- Can now use comments inside optional parameter declaration.
- Better error message for syntax error in lua code.
Fixes
- Fix a bug causing
local_macroandlmacroto be global. - Fix a bug causing an eval block to be evaluated 3 times instead of once.
Deprecation
\def,\defl,\def_local,\setl,\set_local,\default_local,\alias_local,\aliasl,\redefand\redef_forcedwill be removed inv0.9- Old syntax
#and//compatibility will be removed inv0.10. - Non-lua block as parameter of
\if,\elseif,\forand\whilewill no longer be accepted inv0.11.
0.7.0
Changes
- Default space mode is now
light. - Rework a lot of naming:
\defbecame\macro.- The convention for local variant of
\commandis\local_command, with an alias\lcommand. - All old names (
\def,\defl,\def_local,\setl,\set_local,\default_local,\alias_local, and\aliasl) are deprecated, but work for now.
- Deprecate
\redefand\redef_forced. Writing over existing macros will now just print a warning. - The first parameter of
\if,\elseif,\for, and\whilemust now be an eval block. - You can now declare a Plume block inside a Lua block. (only works inside
plumefiles for now, not in external Lua files) - Change eval escape to
$from#. Code using#still works for now. - Change comment syntax to
\--from//. Code using//still works for now. - New option
joinfor\for, which will insert a character between all iterations. ${x}will now render allxelements ifxis a table.- New flag
no_table_joinand new optionjoinfor macro$.
Explanations for the syntaxs changes:
Originally, # was chosen to adhere to the LaTeX macro syntax, \newcommand \double[1] {#1 #1}. However, it doesn't necessarily align with the broader use that Plume makes of it. Moreover, # is used by Lua, which makes some expressions unclear (e.g., #{#t} to print the size of a table) and prevents it from being used to declare plume blocks inside lua blocks. Finally, $ is much more associated with the evaluate function than #.
As for comments, the idea was to reduce the number of special characters to two in order to avoid the need for escaping as much as possible. (For example, // is used in URLs). So, start with \. It couldn't be \\ (because it prints the character \) and \$ was pretty weird, so \-- was chosen in alignment with the -- used by Lua.
Enhancement
- Plume comment will now work in Lua blocks.
- Remove useless lines from traceback.
- Warnings will be printed only one time per faulty code chunk.
Fixes
- Fix wrong space mode name.
- Plume no longer see
a==4as a statement. - Fix an error causing Plume to crash if a for loop go over the iteration limit.