Skip to content

Commit

Permalink
Add scope to file header
Browse files Browse the repository at this point in the history
  • Loading branch information
sasial-dev committed Dec 19, 2023
1 parent 0bc82cf commit b3c8bbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion zap/src/output/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ impl<'a> ClientOutput<'a> {
}

pub fn output(mut self) -> String {
self.push_file_header();
self.push_file_header("Client");

self.push(include_str!("client.luau"));

Expand Down
4 changes: 2 additions & 2 deletions zap/src/output/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ pub trait Output {
}
}

fn push_file_header(&mut self) {
fn push_file_header(&mut self, scope: &str) {
self.push_line("--!native");
self.push_line("--!optimize 2");

self.push_line(&format!(
"-- Generated by Zap v{} (https://github.com/red-blox/zap)",
"-- {scope} generated by Zap v{} (https://github.com/red-blox/zap)",
env!("CARGO_PKG_VERSION")
));

Expand Down
2 changes: 1 addition & 1 deletion zap/src/output/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ impl<'a> ServerOutput<'a> {
}

pub fn output(mut self) -> String {
self.push_file_header();
self.push_file_header("Server");

self.push(include_str!("server.luau"));

Expand Down

0 comments on commit b3c8bbd

Please sign in to comment.