swrs 0.1.1

A simple rust library that reads and parses a sketchware project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate swrs;

use std::fs;
use swrs::parser::Parsable;
use swrs::parser::project::Project;

fn main() {
    let mut args = std::env::args();
    args.next();

    let filename = args.next().expect("File path of a project to parse");
    let parsed = Project::parse(
        &*fs::read_to_string(filename).expect("Invalid path given"))
        .expect("Corrupted project file");

    println!("{:?}", parsed);
}