@@ -458,7 +458,7 @@ module GenerateTests =
458
458
459
459
let value = getType m.Value
460
460
461
- AppPrefix ( LongIdent ( " System.Collections.Generic.Dictionary " ), [ key; value ])
461
+ createDictionary [ key; value ]
462
462
463
463
| MetaModel.Type.StringLiteralType t ->
464
464
LongIdent( " string" )
@@ -573,10 +573,10 @@ module GenerateTests =
573
573
]
574
574
575
575
try
576
-
577
576
Record( structure.Name) {
578
- // expandFields structure
579
- Field( " TODO" , LongIdent " TODO" )
577
+ yield !
578
+ expandFields structure
579
+ |> List.map ( fun ( name , t ) -> Field( name, t))
580
580
}
581
581
with e ->
582
582
raise
@@ -625,7 +625,7 @@ module GenerateTests =
625
625
|> LongIdent
626
626
627
627
let value = getType m.Value
628
- AppPrefix ( LongIdent ( " System.Collections.Generic.Dictionary " ), [ key; value ])
628
+ createDictionary [ key; value ]
629
629
630
630
| MetaModel.Type.StringLiteralType t -> String()
631
631
| MetaModel.Type.TupleType t ->
@@ -679,14 +679,18 @@ module GenerateTests =
679
679
Abbrev( " DocumentUri" , " string" )
680
680
Abbrev( " RegExp" , " string" )
681
681
682
+ Class( " ErasedUnionAttribute" ) {
683
+ Inherit( " System.Attribute()" )
684
+ }
685
+
682
686
// Assuming the max is 5, can be increased if needed
683
687
for i in [ 2 .. 5 ] do
684
688
Union( $" U%d {i}" ) {
685
689
for j = 1 to i do
686
690
UnionCase( $" C{j}" , Field $" 'T{j}" )
687
691
}
688
692
|> _. attribute( Attribute " ErasedUnion" )
689
- |> _. typeParams([ for j = 1 to i do $" T{j}" ])
693
+ |> _. typeParams([ for j = 1 to i do $" ' T{j}" ])
690
694
691
695
for s in parsedMetaModel.Structures do
692
696
if isUnitStructure s then
@@ -704,7 +708,11 @@ module GenerateTests =
704
708
|> _. toRecursive()
705
709
}
706
710
707
- let writeToFile path contents = File.WriteAllText( path, contents)
711
+
712
+
713
+ let writeToFile path contents =
714
+ printfn " %A " contents
715
+ File.WriteAllText( path, contents)
708
716
709
717
source
710
718
|> Gen.mkOak
0 commit comments