Skip to content

Commit b915c5d

Browse files
authored
Merge pull request #4 from mmiller-max/mm/fix-variable-location
Fix variable location
2 parents b77aed3 + 2a78f83 commit b915c5d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GraphQLParser"
22
uuid = "0ae10fbf-af58-4883-b66b-ff0ac82d20dd"
33
authors = ["Mal Miller and contributors"]
4-
version = "0.1.1"
4+
version = "0.1.2"
55

66
[deps]
77
Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"

src/parser.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ function parse_fragment_definition(buf, pos, line, column, len)
117117
end
118118

119119
function parse_variable_definitions(buf, pos, line, column, len)
120-
start_line = line
121-
start_column = column
122120
b = getbyte(buf, pos)
123121
if b != UInt('(') # redundant check?
124122
invalid("Variable definitions must start with '('", buf, pos)
@@ -130,6 +128,8 @@ function parse_variable_definitions(buf, pos, line, column, len)
130128

131129
variables_defs = VariableDefinition[]
132130
while b != UInt(')')
131+
start_line = line
132+
start_column = column
133133
if b != UInt('$')
134134
invalid("Variable name must start with '\$'", buf, pos)
135135
end

0 commit comments

Comments
 (0)