1
- use std:: sync:: Arc ;
2
1
3
- use formality_core:: { id , Downcast , DowncastFrom , Upcast } ;
2
+ use formality_core:: id ;
4
3
use formality_macros:: term;
5
- use formality_types:: grammar:: { FieldId , Ty } ;
4
+ use formality_types:: grammar:: Ty ;
6
5
7
6
// This definition is based on [MiniRust](https://github.com/minirust/minirust/blob/master/spec/lang/syntax.md).
8
7
@@ -62,10 +61,10 @@ pub enum Terminator {
62
61
// Unreachable
63
62
// Intrinsic
64
63
65
- #[ grammar( call $?cc $ callee$( arguments) -> $ret $: goto $next_block) ]
64
+ #[ grammar( call $callee$( arguments) -> $ret $: goto $next_block) ]
66
65
Call {
67
66
callee : ValueExpression ,
68
- cc : CallingConvention ,
67
+ // cc: CallingConvention,
69
68
arguments : Vec < ArgumentExpression > ,
70
69
ret : PlaceExpression ,
71
70
next_block : Option < BbId > ,
@@ -75,17 +74,6 @@ pub enum Terminator {
75
74
Return ,
76
75
}
77
76
78
- #[ term]
79
- #[ derive( Default ) ]
80
- pub enum CallingConvention {
81
- #[ default]
82
- #[ grammar( ( Rust ) ) ]
83
- Rust ,
84
-
85
- #[ grammar( ( C ) ) ]
86
- C ,
87
- }
88
-
89
77
#[ term]
90
78
pub enum ArgumentExpression {
91
79
ByValue ( ValueExpression ) ,
@@ -95,8 +83,8 @@ pub enum ArgumentExpression {
95
83
#[ term]
96
84
pub enum ValueExpression {
97
85
// Const
98
- #[ grammar( $( v0) as $v1) ]
99
- Tuple ( Vec < ValueExpression > , Ty ) ,
86
+ // #[grammar($(v0) as $v1)]
87
+ // Tuple(Vec<ValueExpression>, Ty),
100
88
// Union
101
89
// Variant
102
90
// GetDiscriminant
@@ -110,8 +98,8 @@ pub enum ValueExpression {
110
98
#[ term]
111
99
pub enum PlaceExpression {
112
100
Local ( LocalId ) ,
113
- Deref ( Arc < ValueExpression > ) ,
114
- Field ( Arc < PlaceExpression > , FieldId ) ,
101
+ // Deref(Arc<ValueExpression>),
102
+ // Field(Arc<PlaceExpression>, FieldId),
115
103
// Index
116
104
// Downcast
117
105
}
0 commit comments