Section "player"

This cross compiler generates a JavaScript text in Unicode. Prolog strings are enclosed by the JavaScript string literal double quote (“). The code points \n, \r, \v, \t, \b, \f, \', \", \\ and / are es-caped by a backslash. Control and invalid code points are escaped by the JavaScript notation \xXX and \uXXXX. Otherwise, the Prolog string is written verbatim.

The following transpile commands are provided:

transpile_begin(B):
transpile_begin(B, O):
The predicate succeeds in writing an empty JavaScript file B. The following transpile op-tions O are recognized:

main_entry(E): E indicates whether function main() should be generated.
doge(A): A is the location of Dogelog player.

transpile_add(A, B):
transpile_add(A, B, O):
The predicate succeeds in cross compiling the Prolog text file A into JavaScript file B.
transpile_end(B):
transpile_end(B, O):
The predicate succeeds adding an epilogue to the JavaScript file B.
bundle_add(A, B):
bundle_add(A, B, O):
The predicate succeeds in appending the JavaScript files A to the JavaScript file B, con-verting JavaScript imports. The bundler silently overwrites an already existing JavaScript file B. The ternary predicate allows specifying bundle options.

keep_export(E): E indicates whether exports should be kept.
keep_import(I): I indicates whether imports should be kept.

Kommentare