PreProcessor:
Filter:
PreProcessor/Classes (extension) | Language | Little Languages

PreProcessor
ExtensionExtension

Embed languages in SuperCollider

Description

Using start and end delimiters, PreProcessor internally converts parts of code into a function that you can call, passing in an event with parameters, to which you may add the results. It returns the event.

See also: Interpreter: -preProcessor.

Class Methods

.current

The preprocessor active in the current context.

Instance Methods

.translate

Arguments:

code
event

.value

This method is used in Interpreter and is called before any code is interpreted.

Arguments:

string

.startDelimiter

The signal to start to interpret the string following it as a certain language. By default, this is "<%".

NOTE: If you set the delimiters to a string that is valid part of sclang code, you may not be able to evaluate code anymore, and thus get stuck in an error state. In such a case, you need to recompile the library.

.endDelimiter

The signal to end to interpret the string following it as a certain language. By default, this is "%>".

.verbose

If set to true, the preprocessor prints information to the post window.

Examples