import type { AssignmentExpression, FieldAccessExpression, FieldSelfInvocationExpression, IndexSelfInvocationExpression, InvocationExpression, AbstractInvocationExpression, ExecutableExpression, FieldAssignmentExpression } from "@hylimo/core"; import { IdentifierExpression, RuntimeAstTransformer } from "@hylimo/core"; /** * Transforms the AST into an executable AST where completion expressions are replaced with * ExecutableCompletionExpressions if they are in the completion range. */ export declare class CompletionAstTransformer extends RuntimeAstTransformer { private readonly position; /** * Creates a new CompletionAstTransformer * * @param position the position in the source code where the completion is requested */ constructor(position: number); visitAssignmentExpression(expression: AssignmentExpression): ExecutableExpression; visitFieldAssignmentExpression(expression: FieldAssignmentExpression): ExecutableExpression; visitFieldAccessExpression(expression: FieldAccessExpression): ExecutableExpression; visitIdentifierExpression(expression: IdentifierExpression): ExecutableExpression; /** * Override 'test(…)' so that we can autocomplete documented named params declared by 'test' */ visitInvocationExpression(expression: InvocationExpression): ExecutableExpression; /** * Override 'this["test"](…)' so that we can autocomplete documented named params declared by 'test' */ visitIndexSelfInvocationExpression(expression: IndexSelfInvocationExpression): ExecutableExpression; /** * Override 'test.hello(…)' so that we can autocomplete documented named params declared by 'hello' */ visitFieldSelfInvocationExpression(expression: FieldSelfInvocationExpression): ExecutableExpression; /** * Checks whether the user is currently editing any of the inner arguments of an expression that may be a named argument (is an identifier). * * @param func the function expression to check * @return true when named arguments should be suggested */ isEditingArgumentName(func: AbstractInvocationExpression): boolean; visitNoopExpression(): ExecutableExpression; /** * Checks if the given expression is in the completion range * * @param expression the expression to check * @returns true if the expression is in the completion range */ private isInCompletionRange; } //# sourceMappingURL=completionAstTransformer.d.ts.map