File: LanguageConfig.schelp

package info (click to toggle)
supercollider 1%3A3.13.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 80,292 kB
  • sloc: cpp: 476,363; lisp: 84,680; ansic: 77,685; sh: 25,509; python: 7,909; makefile: 3,440; perl: 1,964; javascript: 974; xml: 826; java: 677; yacc: 314; lex: 175; objc: 152; ruby: 136
file content (72 lines) | stat: -rw-r--r-- 2,565 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
CLASS:: LanguageConfig
summary:: Access and modify interpreter configuration
categories:: Language

DESCRIPTION::
The LanguageConfig class provides access to the interpreter configuration.


section:: Configuration File Format
The configuration file is stored in YAML format, which contains one dictionary. The semantics of the dictionary is listed in
the following table:

definitionList::
## teletype::includePaths:: || List of class library paths.
## teletype::excludePaths:: || List of paths to exclude from the class library files (overrides teletype::includePaths::).
## teletype::postInlineWarnings:: || Boolean flag to post warnings about missing inline opportunities.
::

CLASSMETHODS::

METHOD:: store
Store the current configuration to file. Throws an error if the config file cannot be opened or if
writing fails.

argument:: file
Path to the configuration file to store. If the value is code::nil:: it defaults to currently used configuration file, as specified in the IDE preferences, or by the code::sclang -l "/path/to/sclang_conf.yaml":: argument. By default this is code::Platform.userConfigDir +/+ "sclang_conf.yaml"::

subsection:: Library Path Handling

The language configuration mechanism provides a way to add or exclude specific paths for the class library.

note::Changes to the class library paths won't have any effect before the configuration file is stored and the class library is recompiled.::

METHOD:: includePaths
Return the class library include paths.

METHOD:: addIncludePath
Add new class library include path.

METHOD:: removeIncludePath
Remove path from class library include paths.

METHOD:: excludePaths
Return the class library exclude paths.

METHOD:: addExcludePath
Add new class library exclude path.

METHOD:: removeExcludePath
Remove path from class library exclude paths.

METHOD:: currentPath
Return the current config file path.

METHOD:: excludeDefaultPaths
Get or set whether default class library paths are included.

note::
If sclang is started with -a the class library paths are excluded and this value is ignored. The default class library paths are Platform.classLibraryDir, and the system and user extensions directories.
::

subsection:: Compiler Warnings

METHOD:: postInlineWarnings
Get or set the compiler flag, whether warnings should be posted if a FunctionDef cannot be inlined.

code::
LanguageConfig.postInlineWarnings_(true) // warn
if(0.5.coin) { var x; x = 10.rand; x + 1 } { 10 };
LanguageConfig.postInlineWarnings_(false) // ignore it.
if(0.5.coin) { var x; x = 10.rand; x + 1 } { 10 };
::