makeTreeFromBody

HC Data Structure Primitives Constructors makeTreeFromBody
makeTree renderLogoAsHTML

makeTreeFromBody alist


outputs a new Tree, which is a list with special internal representation. A Tree is the fundamental data structure, which can be evaluated directly. It contains the information how many arguments are actually there for a procedure call, and groups them. The primitive makeTreeFromBody is useful to examine this data structure, maybe for using it as base for a source code editor, like first tryings in formualtest2.lg.

Example:

show makeTreeFromBody [
	fd 100 repeat 4 [right 90 fd 50 if repcount==2 [pr 2]] back 100
]

It should print:

[	[fd 100]
	[repeat 4 	[right 90]
	]
	[fd 50]
	[if 	[== 	[repCount]
		2]
		[pr 2]
	]
	[back 100]
]

Examples:

References:

makeTree renderLogoAsHTML