no_class/
no_class.rs

1use fluid_parser::lexer::Lexer;
2use fluid_parser::parser::Parser;
3
4const TEST: &str = r#"class UserInterface {open
5} {
6  Function {make_window()} {open
7  } {
8    Fl_Window Hello {open
9      xywh {821 256 400 344} type Double align 80 resizable visible callback { println!(""); show_window(); }
10    } {
11      Fl_Flex {} {open
12        xywh {5 5 390 335} resizable gap 5 set_size_tuples {2  0 30  2 30 } visible
13      } {
14        Fl_Flex Nmae {open
15          xywh {5 40 390 265} type HORIZONTAL gap 5
16        } {
17          Fl_Text_Display {} {
18            xywh {5 40 390 265} visible
19          }
20        }
21      }
22      Fl_Box this {
23        xywh {5 40 390 265}
24      }
25    }
26  }
27}"#;
28
29fn main() {
30    let l = Lexer::new(TEST);
31    let mut p = Parser::new(l);
32    let a = p.parse();
33    println!("{:#?}", a);
34}