Skip to content

Commit

Permalink
fixed: JavaParser to skip TAB and NEWLINE tokens in parameter_token
Browse files Browse the repository at this point in the history
ref: #428

Signed-off-by: ksg <[email protected]>
  • Loading branch information
ksg97031 committed Oct 4, 2024
1 parent cd1e65e commit 3580aa4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/miniparsers/java.cr
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ class JavaParser
parameter_token = Array(Token).new
else
if token.type != :RPAREN
next if token.type == :TAB || token.type == :NEWLINE # Skip TAB and NEWLINE tokens
parameter_token << token # Add token to the parameter token list
if token.type == :TAB || token.type == :NEWLINE # Skip TAB and NEWLINE tokens
cursor += 1
next
end
parameter_token << token # Add token to the parameter token list
else
lparen_count -= 1
if lparen_count == 0
Expand Down

0 comments on commit 3580aa4

Please sign in to comment.