Skip to content

Commit 97c6c6b

Browse files
committed
Fix "!" after constant handling, it's identifier
1 parent 53f146a commit 97c6c6b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/rdoc/ruby_lex.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,11 @@ def identify_identifier
997997
end
998998

999999
if token[0, 1] =~ /[A-Z]/
1000-
return Token(TkCONSTANT, token)
1000+
if token[-1] =~ /[!?]/
1001+
return Token(TkIDENTIFIER, token)
1002+
else
1003+
return Token(TkCONSTANT, token)
1004+
end
10011005
elsif token[token.size - 1, 1] =~ /[!?]/
10021006
return Token(TkFID, token)
10031007
else

0 commit comments

Comments
 (0)