@@ -73,47 +73,47 @@ def skips_whitespace_and_comments():
73
73
74
74
def errors_respect_whitespace ():
75
75
with raises (GraphQLSyntaxError ) as exc_info :
76
- lex_one ("\n \n ? \n " )
76
+ lex_one ("\n \n ~ \n " )
77
77
78
78
assert str (exc_info .value ) == dedent (
79
79
"""
80
- Syntax Error: Unexpected character: '? '.
80
+ Syntax Error: Unexpected character: '~ '.
81
81
82
- GraphQL request:3:5
82
+ GraphQL request:3:2
83
83
2 |
84
- 3 | ?
84
+ 3 | ~
85
85
| ^
86
86
4 |
87
87
"""
88
88
)
89
89
90
90
def updates_line_numbers_in_error_for_file_context ():
91
- s = "\n \n ? \n \n "
91
+ s = "\n \n ~ \n \n "
92
92
source = Source (s , "foo.js" , SourceLocation (11 , 12 ))
93
93
with raises (GraphQLSyntaxError ) as exc_info :
94
94
Lexer (source ).advance ()
95
95
assert str (exc_info .value ) == dedent (
96
96
"""
97
- Syntax Error: Unexpected character: '? '.
97
+ Syntax Error: Unexpected character: '~ '.
98
98
99
99
foo.js:13:6
100
100
12 |
101
- 13 | ?
101
+ 13 | ~
102
102
| ^
103
103
14 |
104
104
"""
105
105
)
106
106
107
107
def updates_column_numbers_in_error_for_file_context ():
108
- source = Source ("? " , "foo.js" , SourceLocation (1 , 5 ))
108
+ source = Source ("~ " , "foo.js" , SourceLocation (1 , 5 ))
109
109
with raises (GraphQLSyntaxError ) as exc_info :
110
110
Lexer (source ).advance ()
111
111
assert str (exc_info .value ) == dedent (
112
112
"""
113
- Syntax Error: Unexpected character: '? '.
113
+ Syntax Error: Unexpected character: '~ '.
114
114
115
115
foo.js:1:5
116
- 1 | ?
116
+ 1 | ~
117
117
| ^
118
118
"""
119
119
)
@@ -527,7 +527,7 @@ def lexes_punctuation():
527
527
528
528
def lex_reports_useful_unknown_character_error ():
529
529
assert_syntax_error (".." , "Unexpected character: '.'." , (1 , 1 ))
530
- assert_syntax_error ("? " , "Unexpected character: '? '." , (1 , 1 ))
530
+ assert_syntax_error ("~ " , "Unexpected character: '~ '." , (1 , 1 ))
531
531
assert_syntax_error ("\x00 " , "Unexpected character: U+0000." , (1 , 1 ))
532
532
assert_syntax_error ("\b " , "Unexpected character: U+0008." , (1 , 1 ))
533
533
assert_syntax_error ("\xAA " , "Unexpected character: U+00AA." , (1 , 1 ))
0 commit comments