fix: improve indentation on GQL editors

This commit is contained in:
Andrew Bastin 2022-05-07 23:33:48 +05:30
parent c3b784c680
commit 127bd7318f

View file

@ -299,8 +299,8 @@ Description {
} }
OperationType { OperationType {
@specialize<Name, "query"> @specialize<Name, "query">
| @specialize<Name, "mutation"> | @specialize<Name, "mutation">
| @specialize<Name, "subscription"> | @specialize<Name, "subscription">
} }
@ -317,7 +317,7 @@ ExecutableDirectiveLocation {
@specialize<Name, "QUERY"> @specialize<Name, "QUERY">
| @specialize<Name, "MUTATION"> | @specialize<Name, "MUTATION">
| @specialize<Name, "SUBSCRIPTION"> | @specialize<Name, "SUBSCRIPTION">
| @specialize<Name, "FIELD"> | @specialize<Name, "FIELD">
| @specialize<Name, "FRAGMENT_DEFINITION"> | @specialize<Name, "FRAGMENT_DEFINITION">
| @specialize<Name, "FRAGMENT_SPREAD"> | @specialize<Name, "FRAGMENT_SPREAD">
| @specialize<Name, "INLINE_FRAGMENT"> | @specialize<Name, "INLINE_FRAGMENT">
@ -338,22 +338,24 @@ TypeSystemDirectiveLocation {
| @specialize<Name, "INPUT_FIELD_DEFINITION"> | @specialize<Name, "INPUT_FIELD_DEFINITION">
} }
@skip { Whitespace | Comment } @skip { whitespace | Comment }
@tokens { @tokens {
Whitespace { whitespace {
std.whitespace+ std.whitespace+
} }
StringValue { StringValue {
"\"\"\"" (!["] | "\\n" | "\"" "\""? !["])* "\"\"\"" | "\"" !["\\\n]* "\"" "\"\"\"" (!["] | "\\n" | "\"" "\""? !["])* "\"\"\"" | "\"" !["\\\n]* "\""
} }
IntValue { IntValue {
"-"? "0" "-"? "0"
| "-"? std.digit+ | "-"? std.digit+
} }
FloatValue { FloatValue {
IntValue ("." std.digit+ | ("e" | "E") IntValue+) IntValue ("." std.digit+ | ("e" | "E") IntValue+)
} }
@precedence { IntValue, FloatValue } @precedence { IntValue, FloatValue }
@ -367,6 +369,8 @@ TypeSystemDirectiveLocation {
Comma { Comma {
"," ","
} }
"{" "}" "[" "]"
} }
@detectDelim @detectDelim