mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
The interpreter now has an "underscore is last value" flag, which makes Interpreter::get_variable() return the last value if: - The m_underscore_is_last_value flag is enabled - The name of the variable lookup is "_" - The result of that lookup is an empty value That means "_" can still be used as a regular variable and will stop doing its magic once anything is assigned to it. Example REPL session: > 1 1 > _ + _ 2 > _ + _ 4 > _ = "foo" "foo" > 1 1 > _ "foo" > delete _ true > 1 1 > _ 1 > |
||
---|---|---|
.. | ||
Heap | ||
Runtime | ||
Tests | ||
AST.cpp | ||
AST.h | ||
CMakeLists.txt | ||
Console.cpp | ||
Console.h | ||
Forward.h | ||
Interpreter.cpp | ||
Interpreter.h | ||
Lexer.cpp | ||
Lexer.h | ||
MarkupGenerator.cpp | ||
MarkupGenerator.h | ||
Parser.cpp | ||
Parser.h | ||
Token.cpp | ||
Token.h |