import type { Name } from '../ast/index.js'; import type { TokenKind } from '../tokens/index.js'; import type { Cursor } from './cursor.js'; /** Whether a token may stand where a word is expected. */ export declare function isWordKind(kind: TokenKind): boolean; /** Whether a word standing where a value belongs is a name the language has taken. */ export declare function isMeantAsAName(kind: TokenKind): boolean; /** * The name at the cursor: an identifier, or a reserved word that is OS1019. * * The word is taken either way. A script that named something `type` still * meant to declare it, and every later diagnostic about that name is more use * to the reader than a hole where the declaration should have been. * * `asValue` is set by the one reader that takes a word from where a value * belongs, and it is what lets the fix be true of the program in front of it. A * word with an argument list after it is a call, and a reader who wrote one * wants the name the library really publishes; the same word being declared or * assigned to wants a name of their own, and the library's would collide. */ export declare function takeName(cursor: Cursor, asValue?: boolean): Name; /** * The label of a named argument, where a reserved word is legal. * * A label is matched against the callee's parameter list and is never looked up * in a scope, so `plot(v, "V", color = aqua)` is correct and is not OS1019. */ export declare function takeLabel(cursor: Cursor): Name; /** * The word after a dot. * * A member is matched against the namespace or the object type it was read * from, which is the same kind of published list a label is matched against, so * a reserved word is not OS1019 here either. Whether the member exists at all * is OS2009, and the checker owns it. */ export declare function takeMember(cursor: Cursor): Name; /** Whether the cursor is on a named argument's label: a word, then a bare `=`. */ export declare function atLabel(cursor: Cursor): boolean; //# sourceMappingURL=names.d.ts.map