Interface Compiler
- All Superinterfaces:
Plugin
- All Known Implementing Classes:
AbstractCompiler
Compiler plugin root interface.
Should be implemented by a plugin. There should exist just one implementation.
Compilers usually extend AbstractCompiler.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA resolved include and the half-open UTF-16 range of its filename in the editor text. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompilerListener(CompilerListener listener) Adds compiler listener.voidCompile given input file.Creates a lexical analyzer.default List<Compiler.IncludeReference> findIncludes(Path sourceFile, String text) Finds include targets in the current editor text.Get source file types supported by the compiler.default SourceCodePosition.ColumnUnitCoordinate convention of this compiler's memory source-position annotations.default booleanDetermine if automation is supported.voidremoveCompilerListener(CompilerListener listener) Removes compiler listener.Methods inherited from interface Plugin
destroy, getCopyright, getDescription, getDocumentationUrl, getTitle, getVersion, initialize, isShowSettingsSupported, reset, showSettings, startAutomation, stopAutomation
-
Method Details
-
addCompilerListener
Adds compiler listener.- Parameters:
listener- compiler listener
-
removeCompilerListener
Removes compiler listener.- Parameters:
listener- compiler listener
-
compile
Compile given input file.If output path is not given, it is derived by replacing the source file extension of the input path. Usually a successfully compiled program is loaded in memory.
- Parameters:
inputPath- input file path (source code)outputPath- optional output file path
-
createLexer
-
findIncludes
Finds include targets in the current editor text. Compilers resolve them against the source file using the same rules as during compilation. -
getSourcePositionColumnUnit
Coordinate convention of this compiler's memory source-position annotations. Declaring a known unit also declares one-based lines, zero-based columns, and tabs counting as one column. UNKNOWN means the consumer cannot safely resolve positions to source offsets. Lexical Token offsets remain UTF-16 independently of this convention. -
getSourceFileTypes
-
isAutomationSupported
default boolean isAutomationSupported()Determine if automation is supported.- Specified by:
isAutomationSupportedin interfacePlugin- Returns:
- true by default
-