Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aibaars committed Sep 24, 2024
1 parent 7b4137f commit d14e77b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rust/extractor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub mod trap;
use ra_ap_syntax::ast::SourceFile;
use ra_ap_syntax::AstNode;

pub fn extract(
fn extract(
archiver: &archive::Archiver,
traps: &trap::TrapFileProvider,
file: std::path::PathBuf,
Expand Down
1 change: 1 addition & 0 deletions rust/extractor/src/translate/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/generated.rs linguist-generated
2 changes: 2 additions & 0 deletions rust/extractor/src/translate/generated.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion rust/generate-schema/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ fn write_schema(
super_types: BTreeMap<String, BTreeSet<String>>,
) -> std::io::Result<String> {
let mut buf: Vec<u8> = Vec::new();
writeln!(
buf,
"# Generated by `cargo generate-schema`, do not edit by hand.\n"
)?;
writeln!(buf, "from .prelude import *\n")?;

for node in &grammar.enums {
Expand Down Expand Up @@ -404,7 +408,8 @@ fn write_extractor(grammar: &AstSrc) -> std::io::Result<String> {
let mut buf: Vec<u8> = Vec::new();
writeln!(
buf,
"use crate::generated;
"//! Generated by `cargo generate-schema`, do not edit by hand.\n
use crate::generated;
use super::base::{{TextValue, Translator}};
use crate::trap::{{Label, TrapId}};
use ra_ap_syntax::ast;
Expand Down
1 change: 1 addition & 0 deletions rust/schema/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/ast.py linguist-generated
2 changes: 2 additions & 0 deletions rust/schema/ast.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d14e77b

Please sign in to comment.