Typeclasses
This commit is contained in:
parent
a4daf88085
commit
8020f9d1a0
6 changed files with 123 additions and 19 deletions
19
src/ast.ts
19
src/ast.ts
|
|
@ -187,6 +187,25 @@ export type Constraint = {
|
|||
typeVar: string
|
||||
}
|
||||
|
||||
export type ClassDefinition = {
|
||||
kind: 'class-definition'
|
||||
name: string
|
||||
param: string
|
||||
methods: { name: string, type: TypeAST }[]
|
||||
line?: number
|
||||
column?: number
|
||||
start?: number
|
||||
}
|
||||
|
||||
export type InstanceDeclaration = {
|
||||
kind: 'instance-declaration'
|
||||
typeName: string
|
||||
className: string
|
||||
line?: number
|
||||
column?: number
|
||||
start?: number
|
||||
}
|
||||
|
||||
export type AST =
|
||||
| Literal
|
||||
| Variable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue