Skip to content

Commit be490ad

Browse files
committed
test: update tests in apollo-smith
1 parent 94dcf38 commit be490ad

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

crates/apollo-parser/src/cst/generated/nodes.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
//! This is a generated file, please do not edit manually. Changes can be
22
//! made in codegeneration that lives in `xtask` top-level dir.
33
4-
use crate::{
5-
cst::{support, CstChildren, CstNode},
6-
SyntaxKind::{self, *},
7-
SyntaxNode, SyntaxToken, S,
8-
};
4+
use crate::cst::support;
5+
use crate::cst::CstChildren;
6+
use crate::cst::CstNode;
7+
use crate::SyntaxKind::*;
8+
use crate::SyntaxKind::{self};
9+
use crate::SyntaxNode;
10+
use crate::SyntaxToken;
11+
use crate::S;
912
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1013
pub struct Name {
1114
pub(crate) syntax: SyntaxNode,

crates/apollo-parser/src/parser/grammar/variable.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ pub(crate) fn variable_definitions(p: &mut Parser) {
2626
}
2727

2828
// Continue parsing while we see descriptions or variables
29-
loop {
30-
match p.peek() {
31-
Some(TokenKind::StringValue | T![$]) => variable_definition(p),
32-
_ => break,
33-
}
29+
while let Some(TokenKind::StringValue | T![$]) = p.peek() {
30+
variable_definition(p);
3431
}
3532

3633
p.expect(T![')'], S![')']);

crates/apollo-smith/src/fragment.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub struct FragmentDef {
2525
impl From<FragmentDef> for ast::Definition {
2626
fn from(x: FragmentDef) -> Self {
2727
ast::FragmentDefinition {
28+
description: None,
2829
name: x.name.into(),
2930
type_condition: x.type_condition.name.into(),
3031
directives: Directive::to_ast(x.directives),

crates/apollo-smith/src/operation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub struct OperationDef {
2828
impl From<OperationDef> for ast::Definition {
2929
fn from(x: OperationDef) -> Self {
3030
ast::OperationDefinition {
31+
description: None,
3132
operation_type: x.operation_type.into(),
3233
name: x.name.map(Into::into),
3334
directives: Directive::to_ast(x.directives),

crates/apollo-smith/src/variable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub struct VariableDef {
2727
impl From<VariableDef> for ast::VariableDefinition {
2828
fn from(x: VariableDef) -> Self {
2929
Self {
30+
description: None,
3031
name: x.name.into(),
3132
ty: Node::new(x.ty.into()),
3233
default_value: x.default_value.map(|x| Node::new(x.into())),

0 commit comments

Comments
 (0)