forked from AbleOS/ableos
changed file extension to .aldi and made it so that decorators don't work
This commit is contained in:
parent
94b7aabdec
commit
b5cdc9c4fd
|
@ -85,7 +85,7 @@ fn build(a: Vec<Token>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn open_protocol(name: String) -> String {
|
fn open_protocol(name: String) -> String {
|
||||||
let path = format!("sysdata/idl/{}/src/protocol.aidl", name);
|
let path = format!("sysdata/idl/{}/src/protocol.aldi", name);
|
||||||
let mut file = std::fs::File::open(path).unwrap();
|
let mut file = std::fs::File::open(path).unwrap();
|
||||||
let mut contents = String::new();
|
let mut contents = String::new();
|
||||||
file.read_to_string(&mut contents).unwrap();
|
file.read_to_string(&mut contents).unwrap();
|
||||||
|
|
|
@ -32,6 +32,7 @@ fn parse_decorated_declarations(tokens : &mut Peekable<Iter<'_, Token>>) -> Vec<
|
||||||
match tokens.peek() {
|
match tokens.peek() {
|
||||||
Some(_) => {
|
Some(_) => {
|
||||||
let decoration = parse_decoration(tokens);
|
let decoration = parse_decoration(tokens);
|
||||||
|
assert!(decoration == None, "NO DECORATIONS!!!");
|
||||||
let declaration = parse_declaration(tokens);
|
let declaration = parse_declaration(tokens);
|
||||||
|
|
||||||
declarations.push(DecoratedDeclaration(decoration, declaration));
|
declarations.push(DecoratedDeclaration(decoration, declaration));
|
||||||
|
|
|
@ -57,7 +57,7 @@ pub fn new(development_type: DevelopmentType, name: String) {
|
||||||
let (folder_hierarchy, entry_name) = match development_type {
|
let (folder_hierarchy, entry_name) = match development_type {
|
||||||
DevelopmentType::Program => ("programs", "main.hb"),
|
DevelopmentType::Program => ("programs", "main.hb"),
|
||||||
DevelopmentType::Library => ("libraries", "lib.hb"),
|
DevelopmentType::Library => ("libraries", "lib.hb"),
|
||||||
DevelopmentType::IDL => ("idl", "protocol.aidl"),
|
DevelopmentType::IDL => ("idl", "protocol.aldi"),
|
||||||
};
|
};
|
||||||
let project_folder_path_string = format!("sysdata/{folder_hierarchy}/{name}");
|
let project_folder_path_string = format!("sysdata/{folder_hierarchy}/{name}");
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// Err = 0,
|
// Err = 0,
|
||||||
// Ok,
|
// Ok,
|
||||||
//}
|
//}
|
||||||
@example
|
|
||||||
struct Log {
|
struct Log {
|
||||||
log_level: LogLevel,
|
log_level: LogLevel,
|
||||||
}
|
}
|
Loading…
Reference in a new issue