mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-11 17:30:18 +00:00
27a781dd3f
* 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
45 lines
832 B
TypeScript
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;
|