mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
1e636cc076
Add infoType
47 lines
880 B
TypeScript
47 lines
880 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 {
|
|
infoType: "error",
|
|
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[]
|
|
}
|
|
|
|
export class Compiler {
|
|
compile(path: string, imports: string[]): Promise<CompilationResult>;
|
|
}
|
|
|
|
export var AquaLSP: Compiler;
|