aqua/language-server/language-server-npm/aqua-lsp-api.d.ts

47 lines
880 B
TypeScript
Raw Permalink Normal View History

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
}
2022-05-17 12:05:25 +00:00
export interface ErrorInfo {
infoType: "error",
2022-05-17 12:05:25 +00:00
start: number,
end: number,
message: string,
location: string | null
}
export interface WarningInfo {
infoType: "warning",
start: number,
end: number,
message: string,
location: string | null
}
export interface CompilationResult {
errors: ErrorInfo[],
warnings: WarningInfo[],
locations: TokenLink[],
importLocations: TokenImport[]
}
2022-05-17 12:05:25 +00:00
export class Compiler {
compile(path: string, imports: string[]): Promise<CompilationResult>;
2022-05-17 12:05:25 +00:00
}
export var AquaLSP: Compiler;