mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
Shell: Implement arithmetic expansions for POSIX mode
This also adds a 'math' immediate function that can be used in Shell proper to do arithmetic stuff.
This commit is contained in:
parent
d0112d76e9
commit
7c312980b0
4 changed files with 816 additions and 11 deletions
|
@ -179,7 +179,12 @@ struct ResolvedCommandExpansion {
|
|||
ExpansionRange range;
|
||||
};
|
||||
|
||||
using ResolvedExpansion = Variant<ResolvedParameterExpansion, ResolvedCommandExpansion>;
|
||||
struct ResolvedArithmeticExpansion {
|
||||
String source_expression;
|
||||
ExpansionRange range;
|
||||
};
|
||||
|
||||
using ResolvedExpansion = Variant<ResolvedParameterExpansion, ResolvedCommandExpansion, ResolvedArithmeticExpansion>;
|
||||
|
||||
struct HeredocEntry {
|
||||
String key;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue