Skip to content

Commit b083b66

Browse files
committed
Add a few more type annotations to Parser::Builders::Default
1 parent cc5eb42 commit b083b66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/parser/builders/default.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,10 +2295,14 @@ def collapse_string_parts?(parts)
22952295
[:str, :dstr].include?(parts.first.type)
22962296
end
22972297

2298+
# @param [::Parser::AST::Node] token
2299+
# @return [String]
22982300
def value(token)
22992301
token[0]
23002302
end
23012303

2304+
# @param [::Parser::AST::Node] token
2305+
# @return [String]
23022306
def string_value(token)
23032307
unless token[0].valid_encoding?
23042308
diagnostic(:error, :invalid_encoding, nil, token[1])

0 commit comments

Comments
 (0)