Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 388 Bytes

File metadata and controls

18 lines (14 loc) · 388 Bytes

https://craftinginterpreters.com/functions.html#function-objects

Implementing custom functions.

i.e

fun sayHi(first, last) {
 print "Hi, " + first + " " + last + "!";
}
sayHi("Dear", "Reader");

The parsing for the func definition and the func call are implemented.

Work to do:

  • Store the IDENTIFIER:sayHi -> code to run in interpreter
  • Lookup this code
  • Run this code