parsing lambdas
This commit is contained in:
parent
0f0371461d
commit
6e8b5afd3b
3 changed files with 43 additions and 52 deletions
|
|
@ -154,6 +154,10 @@ export function prettyPrint(ast: AST, indent = 0): string {
|
|||
.join(', ');
|
||||
return `${i}{${fields}}`;
|
||||
|
||||
case 'lambda':
|
||||
const params = ast.params.join(', ')
|
||||
return `${i}(${params}) => ${prettyPrint(ast.body)}`
|
||||
|
||||
default:
|
||||
return `${i}${ast.kind}`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue