@@ -145,26 +145,26 @@ def dedented_lines(description):
145
145
146
146
def hash_syntax_node (node ):
147
147
# Hash into the syntax name and serialization code
148
- result = hash ((node .name , str ( get_serialization_code (node .syntax_kind ) )))
148
+ result = hash ((node .name , get_serialization_code (node .syntax_kind )))
149
149
for child in node .children :
150
150
# Hash into the expected child syntax
151
151
result = hash ((result , child .syntax_kind ))
152
152
# Hash into the child name
153
153
result = hash ((result , child .name ))
154
154
# Hash into whether the child is optional
155
- result = hash ((result , str ( child .is_optional ) ))
155
+ result = hash ((result , child .is_optional ))
156
156
return result
157
157
158
158
159
159
def hash_token_syntax (token ):
160
160
# Hash into the token name and serialization code
161
- return hash ((token .name , str ( token .serialization_code ) ))
161
+ return hash ((token .name , token .serialization_code ))
162
162
163
163
164
164
def calculate_node_hash ():
165
165
result = 0
166
166
for node in SYNTAX_NODES :
167
- result = hash ((result , hash_syntax_node (node = node )))
167
+ result = hash ((result , hash_syntax_node (node )))
168
168
for token in SYNTAX_TOKENS :
169
- result = hash ((result , hash_token_syntax (token = token )))
169
+ result = hash ((result , hash_token_syntax (token )))
170
170
return result
0 commit comments