1 Phrases
Sasha Koshka edited this page 2022-08-30 05:59:39 +00:00

ARF does not make a syntactical distinction between functions and operators. It instead has a concept called a phrase, which is similar to an s-expression in lisp. A phrase is just a list of arguments, where the first argument is the function, method, or operator to execute, and the rest are, well, arguments to it.

Phrases sometimes need to be delimited by square brackets:

[f arg1 arg2 arg3]

But, if the phrase does not contain any line breaks directly in it, and it is not being used as an argument, it can be written without the brackets:

f arg1 arg2 arg3

A phrase need not have brackets if the line break(s) inside of it are contained within brackets:

f [g
	arg1
	arg2] arg3

However, a phrase must have brackets if it is being used as an argument in any context:

f [g arg1 arg2] arg3

If the phrase has no brackets, it is terminated by the end of its line, or the presence of a return direction arrow.