Implement the kernel syntax for procedure application statements. This includes the parsing of procedure application statements (only in kernel syntax), and their execution, as well as the parsing of procedure values and their value creation logic.
The kernel syntax for the procedure application statement is as follows:
{<ProcedureVariable> <Arg1> <Arg2> ... <ArgN>}
The kernel syntax for the procedure value creation is as follows:
<ProcedureVariable> = proc {$ <Arg1> <Arg2> ... <ArgN>} <statement> end
Examples
The application should parse and execute the following example correctly:
Example 1
local First in local A in local B in local C in
First = proc {$ X Y Z}
Z = X
end
A = 5
B = 10
{First A B C}
end end end end
Tasks
[ ] Reorganize parser files to support values which depend on statement parsing.
[ ] Implement the value parser for procedure values
[ ] Augment the value creation to support procedure values
Description
Implement the kernel syntax for procedure application statements. This includes the parsing of procedure application statements (only in kernel syntax), and their execution, as well as the parsing of procedure values and their value creation logic.
The kernel syntax for the procedure application statement is as follows:
The kernel syntax for the procedure value creation is as follows:
Examples
The application should parse and execute the following example correctly:
Example 1
Tasks