LanguageConfig:
Filter:
Classes | Language

LanguageConfig : Object

Access and modify interpreter configuration

Description

The LanguageConfig class provides access to the interpreter configuration.

Class Methods

LanguageConfig.store(file)

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

Arguments:

file

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

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.

LanguageConfig.includePaths

Return the class library include paths.

LanguageConfig.addIncludePath(aPath)

Add new class library include path.

LanguageConfig.removeIncludePath(aPath)

Remove path from class library include paths.

LanguageConfig.excludePaths

Return the class library exclude paths.

LanguageConfig.addExcludePath(aPath)

Add new class library exclude path.

LanguageConfig.removeExcludePath(aPath)

Remove path from class library exclude paths.

LanguageConfig.currentPath

Return the current config file path.

LanguageConfig.excludeDefaultPaths

LanguageConfig.excludeDefaultPaths = aBoolean

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.

Compiler Warnings

LanguageConfig.postInlineWarnings

LanguageConfig.postInlineWarnings = aBoolean

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

Inherited class methods

Instance Methods

Inherited instance methods

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:

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