-
Book Overview & Buying
-
Table Of Contents
Building Programming Language Interpreters
By :
The convention on how a function is called is a fundamental part of any runtime, interpreted or not. The function needs to be able to receive the arguments and produce the result. In the C++ language, for instance, that is specified as part of the application binary interface (ABI) of the specific platform.
In this interpreter, I will keep things simple. The arguments to the function will be represented as a single value that packs a dynamic list of values, which will then be bound to the parameters of the function.
The calling convention for the FunctionCall operation will be that Callable is given as the first argument and DynamicList as the second. The argument names are going to be described in Callable, and the FunctionCall operation will bind those arguments into LexicalPad according to their position.
So, the first step is adding a new type to the Value variant, which I am calling DynamicList. This will be simply a vector of values. I will not...
Change the font size
Change margin width
Change background colour