Skip to content

Commit

Permalink
feat(biome_graphql_parser): parse schema extension
Browse files Browse the repository at this point in the history
  • Loading branch information
vohoanglong0107 committed May 17, 2024
1 parent b1e7be6 commit c07a631
Show file tree
Hide file tree
Showing 18 changed files with 1,044 additions and 769 deletions.
52 changes: 20 additions & 32 deletions crates/biome_graphql_factory/src/generated/node_factory.rs

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

100 changes: 36 additions & 64 deletions crates/biome_graphql_factory/src/generated/syntax_factory.rs

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

11 changes: 10 additions & 1 deletion crates/biome_graphql_parser/src/parser/definitions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use self::{
operation::{parse_operation_definition, parse_selection_set},
r#enum::parse_enum_type_definition,
scalar::parse_scalar_type_definition,
schema::parse_schema_definition,
schema::{parse_schema_definition, parse_schema_extension},
union::parse_union_type_definition,
};

Expand Down Expand Up @@ -88,6 +88,15 @@ fn parse_definition(p: &mut GraphqlParser) -> ParsedSyntax {
T![enum] => parse_enum_type_definition(p),
T![input] => parse_input_object_type_definition(p),
T![directive] => parse_directive_definition(p),
T![extend] => parse_extension(p),
_ => Absent,
}
}

#[inline]
fn parse_extension(p: &mut GraphqlParser) -> ParsedSyntax {
match p.nth(1) {
T![schema] => parse_schema_extension(p),
_ => Absent,
}
}
Expand Down
Loading

0 comments on commit c07a631

Please sign in to comment.