File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- use std:: { collections :: BTreeMap , fmt} ;
1+ use std:: fmt;
22
33use p3_field:: PrimeCharacteristicRing ;
44
@@ -7,10 +7,7 @@ use crate::{
77 intermediate_bytecode:: HighLevelOperation ,
88} ;
99
10- #[ derive( Debug , Clone ) ]
11- pub struct Program {
12- pub functions : BTreeMap < String , Function > ,
13- }
10+ pub mod program;
1411
1512#[ derive( Debug , Clone ) ]
1613pub struct Function {
@@ -525,20 +522,6 @@ impl fmt::Display for Line {
525522 }
526523}
527524
528- impl fmt:: Display for Program {
529- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
530- let program_str = self
531- . functions
532- . values ( )
533- . map ( ToString :: to_string)
534- . collect :: < Vec < _ > > ( )
535- . join ( "\n \n " ) ;
536-
537- // Write the final, joined string to the formatter.
538- write ! ( f, "{program_str}" )
539- }
540- }
541-
542525impl fmt:: Display for Function {
543526 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
544527 let args_str = self
Original file line number Diff line number Diff line change 1+ use std:: { collections:: BTreeMap , fmt} ;
2+
3+ use crate :: lang:: Function ;
4+
5+ #[ derive( Debug , Clone ) ]
6+ pub struct Program {
7+ pub functions : BTreeMap < String , Function > ,
8+ }
9+
10+ impl fmt:: Display for Program {
11+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
12+ let program_str = self
13+ . functions
14+ . values ( )
15+ . map ( ToString :: to_string)
16+ . collect :: < Vec < _ > > ( )
17+ . join ( "\n \n " ) ;
18+
19+ // Write the final, joined string to the formatter.
20+ write ! ( f, "{program_str}" )
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments