aqua/language-server/language-server-npm/aqua-lsp-api.d.ts
InversionSpaces 27a781dd3f
feat(compiler): Add warnings subsystem [fixes LNG117] (#906)
* ErrorsAlgebra -> ReportAlgebra

* Refactor ReportAlgebra

* Refactor

* Refactor AquaError

* Fixes

* Add warnings, refactor

* Refactor parser

* Move semantics

* Savepoint

* Refactor semantics and compiler

* Refactor types

* Refactor compiler

* Refactor compiler

* Refactor types

* Refactor retunr types

* Return warnings

* Add simple warning

* Refactor to ValidatedNec

* Refactor

* Add comment

* Propagate warnings to LspContext

* Propagate warnings to LSP

* Add warnings to js api

* Update LSP js api

* Use export declare

* Add comment

* Refactor span rendering

* Remove variable name warning

* Add warning on unused call results

* Add unit tests

* Remove println
2023-09-25 13:00:43 +00:00

45 lines
832 B
TypeScript

export interface TokenLocation {
name: string,
startLine: number,
startCol: number,
endLine: number,
endCol: number
}
export interface TokenLink {
current: TokenLocation,
definition: TokenLocation
}
export interface TokenImport {
current: TokenLocation,
path: string
}
export interface ErrorInfo {
start: number,
end: number,
message: string,
location: string | null
}
export interface WarningInfo {
start: number,
end: number,
message: string,
location: string | null
}
export interface CompilationResult {
errors: ErrorInfo[],
warnings: WarningInfo[],
locations: TokenLink[],
importLocations: TokenImport[]
}
export class Compiler {
compile(path: string, imports: string[]): Promise<CompilationResult>;
}
export var AquaLSP: Compiler;