[WIP] Implement parsing for lambdas + start implementing call
This commit is contained in:
@@ -21,17 +21,17 @@ export type DropData = {
|
||||
*/
|
||||
export class Drop extends Command<DropData> {
|
||||
async attemptParse(context: ParseContext): Promise<DropData> {
|
||||
const next = context.peekTerm()
|
||||
const next = await context.peekTerm()
|
||||
if ( next?.term === 'int' || next?.term === 'variable' ) {
|
||||
return {
|
||||
type: 'index',
|
||||
specific: context.popTerm(),
|
||||
specific: await context.popTerm(),
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
type: context.popKeywordInSet(['line', 'word', 'index']).value,
|
||||
specific: context.popTerm(),
|
||||
specific: await context.popTerm(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user