libabbs 0.1.8

Library for aosc-os-abbs maintenance
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{
	env::{self, args},
	fs,
};

fn main() {
	let file = args().nth(1).expect("Usage: apml-lex <PATH>");
	let src = fs::read_to_string(&file).unwrap();
	let tree = libabbs::apml::lst::ApmlLst::parse(&src).unwrap();

	// validation
	assert_eq!(tree.to_string(), src);

	if env::var("QUIET").is_err() {
		println!("{tree:#?}");
	}
}