Closed badlop closed 7 months ago
That would work but I was thinking along the lines of:
-record(if_stmt, {line, test_blocks, else_block}).
which is bit more informative and get away from my ultra short keys. :smile: Do you know if I can make these changes to the PR ans still use it.
Ah, right! it seems preferable to use a specific atom instead of 'else'
.
For example, I tipically search over the source code a lot, and having a specific name like else_block
(or whatever) will help me to find where that element is used in the code.
Ok, I've force-pushed a modified commit, and now the PR shows that improvement.
Compiling Luerl with Erlang/OTP 27.0-rc1 fails with error message
syntax error before: 'else'
:This is because
else
is now a reserved keyword, similarly tomaybe
. The solution is quite simple: quoteelse
to ensure the compiler treats it as an atom and not a keyword.https://erlang.org/documentation/doc-15.0-rc1/doc/upcoming_incompatibilities.html#feature-maybe_expr-will-be-enabled-by-default