@@ -61,7 +61,7 @@ public class Parser {
61
61
62
62
isolated function parseOperationWithType(RootOperationType operationType ) returns Error ? {
63
63
Token token = check self .readNextNonSeparatorToken ();
64
- Location location = token .location . clone () ;
64
+ Location location = token .location ;
65
65
token = check self .peekNextNonSeparatorToken ();
66
66
string operationName = check getOperationNameFromToken (self );
67
67
token = check self .peekNextNonSeparatorToken ();
@@ -76,7 +76,7 @@ public class Parser {
76
76
77
77
isolated function parseFragment() returns Error ? {
78
78
Token token = check self .readNextNonSeparatorToken (); // fragment keyword already validated
79
- Location location = token .location . clone () ;
79
+ Location location = token .location ;
80
80
81
81
token = check self .readNextNonSeparatorToken ();
82
82
string name = check getIdentifierTokenvalue (token );
@@ -124,10 +124,10 @@ public class Parser {
124
124
if token .kind != T_DOLLAR {
125
125
return getExpectedCharError (token , DOLLAR );
126
126
}
127
- Location varDefinitionLocation = token .location . clone () ;
127
+ Location varDefinitionLocation = token .location ;
128
128
token = check self .readNextNonSeparatorToken ();
129
129
string name = check getIdentifierTokenvalue (token );
130
- Location varLocation = token .location . clone () ;
130
+ Location varLocation = token .location ;
131
131
token = check self .readNextNonSeparatorToken ();
132
132
if token .kind != T_COLON {
133
133
return getExpectedCharError (token , COLON );
@@ -248,7 +248,7 @@ public class Parser {
248
248
while token .kind != T_CLOSE_PARENTHESES {
249
249
token = check self .readNextNonSeparatorToken ();
250
250
string name = check getIdentifierTokenvalue (token );
251
- Location location = token .location . clone () ;
251
+ Location location = token .location ;
252
252
token = check self .readNextNonSeparatorToken ();
253
253
if token .kind != T_COLON {
254
254
return getExpectedCharError (token , COLON );
@@ -280,7 +280,7 @@ public class Parser {
280
280
}
281
281
while token .kind == T_AT {
282
282
token = check self .readNextNonSeparatorToken (); //consume @
283
- Location location = token .location . clone () ;
283
+ Location location = token .location ;
284
284
token = check self .readNextNonSeparatorToken ();
285
285
string name = check getIdentifierTokenvalue (token );
286
286
token = check self .peekNextNonSeparatorToken ();
@@ -301,7 +301,7 @@ public class Parser {
301
301
while token .kind != T_CLOSE_PARENTHESES {
302
302
token = check self .readNextNonSeparatorToken ();
303
303
string varName = check getIdentifierTokenvalue (token );
304
- Location location = token .location . clone () ;
304
+ Location location = token .location ;
305
305
token = check self .readNextNonSeparatorToken ();
306
306
if token .kind != T_COLON {
307
307
return getExpectedCharError (token , COLON );
@@ -349,7 +349,7 @@ public class Parser {
349
349
while token .kind != T_CLOSE_BRACE {
350
350
token = check self .readNextNonSeparatorToken ();
351
351
string fieldName = check getIdentifierTokenvalue (token );
352
- Location fieldLocation = token .location . clone () ;
352
+ Location fieldLocation = token .location ;
353
353
if visitedFields .indexOf (fieldName ) != () {
354
354
return getDuplicateFieldError (token );
355
355
}
0 commit comments