Fix: Field list and struct all order
This commit is contained in:
+2
-4
@@ -1,9 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct FieldList(pub HashMap<String, (bool, TypeExpr)>);
|
||||
pub struct FieldList(pub Vec<(String, bool, TypeExpr)>);
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct ParamList(pub Vec<VarDecl>);
|
||||
@@ -83,7 +81,7 @@ pub enum Postfix {
|
||||
FieldAccess(String),
|
||||
Call(Vec<Expression>),
|
||||
MacroCall(String),
|
||||
StructCall(HashMap<String, Expression>),
|
||||
StructCall(Vec<(String, Expression)>),
|
||||
Index(Expression),
|
||||
Binary(BinaryOp, Expression),
|
||||
}
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ impl From<pest::iterators::Pair<'_, Rule>> for FieldList {
|
||||
};
|
||||
let param_type = TypeExpr::from(param_inner.next().unwrap());
|
||||
let param_name = param_inner.next().unwrap().as_str().to_string();
|
||||
(param_name, (export, param_type))
|
||||
(param_name, export, param_type)
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user