kozily / admin

Tasks, project documentation and wiki repository
0 stars 0 forks source link

Procedure application statement kernel implementation #43

Closed smpiano closed 6 years ago

smpiano commented 8 years ago

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:

{<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