- Support all augmented assignments using the syntax
op_<
, such as+_<
for+=
. Formatter is also enhanced to eliminate whitespaces among the operators.
- The newly added function/module-level bytecode optimization can make lambdexes running faster.
- Add support for the missing
del_
keyword.
lambdex.utils.ast::ast_from_source
should not modify lines list returned frominspect.getsourcelines()
inplacely. (b3a1bd3)- Compiler should not assume that closure variables order of code object before and after compilation are compatible. Instead, compiler should be repsonsible to re-order the closure tuple when wrapping a code object. (61685b3)
lambda.ast_parser::_shallow_match_ast
should further walk down to default value expressions once a Lambda node matched. (61685b3)
- IN_LBDX_LAMBDA state should end at the rightmost colon, instead of intermediate one. (a8c73a9)
- lambdex now supports function renaming! The feature could enhance readability for error traceback.
- lxfmt now supports
# lxfmt: on
and# lxfmt: off
for temporarily turning on/off formatting.
- Finally comes the corontine syntax! lambdex now supports the keywords
async_def_
,async_with_
,async_for_
andawait_
. - Customized language features are now available! You can enable specific features to fit a preferrable style.
Now we can access to the current lambdex via the callee_
keyword!
lambdex.utils.ast::source_from_ast
should consider the probability that garbadge remains at the end of the source. (accc5a7)
- Windows batch scripts generated by lxfmt-mock should export
LXALIAS=on
. (d4c585e)
lambdex is now supporting keyword and operator customization! See the docs for more details.
lambdex.fmt
should ensure NEWLINE at the end when writing to stdout. (3cbc0fc)
- Fix missing target
test_repl_ipython
. (bb7e9d2)
lambdex is now able to run in REPL! Currently three environments built-in Python REPL, IDLE and IPython (Jupyter) are supported.
- Top-level script checking in
lambdex/__init__.py
should check the first frame that contains no'importlib'
. (6e1dfb8) - Top-level script checking in
lambdex/__init__.py
should not fail ifsite.getusersitepackages
not available. (f174187) lambdex.utils.ast::ast_from_source
should not assume that lines are ending with line separators. (e6aa950)
- Support and tested on Python 3.5, 3.6, 3.7, 3.8, 3.9, 3.10-dev.
- Improve the compile-time error messages.
- Use
sys
instead ofinspect
to check current running environment (as executable or module) inlambdex/__init__.py
.inspect
has far more dependencies thansys
, which may cause module name conflicts in lxfmt. (8a43346) lambdex.utils.ast::is_lvalue
should check recursively. L-value checking is also removed inlambdex.utils.ast::cast_to_lvalue
. (55fbfb6, 8c801bd)lambdex.utils.ast::check_compare
should ensure that argumentnode
is of typeast.Compare
. (5fbe3d5)- Comparisons other than assignments should not raise a
SyntaxError
in body. This allows expressions likea > b
to exist in body. (73c228d) - Default
except_
should be the last exception handler. Otherwise aSyntaxError
raised. (9091565) - Should raise a
SyntaxError
whenfinally_
has a clause head. (ee70df0) - Should raise a
SyntaxError
when unknown clause encountered in atry_
block. (16edff4) - Should raise a
SyntaxError
whenSlice
node found inExtSlice
node. This disallows code likeif_[a:b][...]
. (77d796f)
- Add detailed compile-time and runtime error messages.
<
assignmentsif_
,elif_
,else_
for_
,else_
while_
,else_
try_
,except_
,else_
,finally_
with_
nonlocal_
,global_
pass_
return_
raise_
,from_
yield_
,yield_from_
- Nested lambdex
- Bytecode caching
- CLI tool
lxfmt
- CLI tool
lxfmt-mock