Add more semantic fields to Match and Case
This commit is contained in:
parent
18b6329ee5
commit
beefbd5ce7
@ -371,7 +371,9 @@ type Match struct {
|
||||
Cases []*Case
|
||||
|
||||
// Semantics
|
||||
Ty Type
|
||||
Ty Type
|
||||
CaseOrder []Hash
|
||||
CaseMap map[Hash] *Case
|
||||
}
|
||||
func (*Match) expression(){}
|
||||
func (this *Match) Type () Type { return this.Ty }
|
||||
|
@ -80,6 +80,7 @@ type Case struct {
|
||||
Position errors.Position
|
||||
Declaration *Declaration
|
||||
Expression
|
||||
Scope
|
||||
}
|
||||
func (this *Case) String () string {
|
||||
return fmt.Sprint("| ", this.Declaration, this.Expression)
|
||||
|
Loading…
Reference in New Issue
Block a user