Code blocks

A code block is enclosed by the begin and end keywords. Let's examine what the abstract syntax tree looks like.

The head node just contains a block symbol. When there are multiple lines in the block, the abstract syntax tree also includes line number nodes. In this example, there is a LineNumberNode with line 2 preceding the first call to println. Likewise, there is another LineNumberNode with line 3 preceding the second call to println. The LineNumberNode nodes do not do anything, but they are useful for stack traces and debugging.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.14.63