Skip to content

Commit

Permalink
Include interned string in comment
Browse files Browse the repository at this point in the history
This makes it easier to debug the generated cpp.
  • Loading branch information
seven1m committed Jun 28, 2024
1 parent f7d0b6e commit a3fccde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/natalie/compiler/backends/cpp_backend/transform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def intern(symbol)

def interned_string(str, encoding)
index = @interned_strings[[str, encoding]] ||= @interned_strings.size
"#{interned_strings_var_name}[#{index}]"
"#{interned_strings_var_name}[#{index}]/*#{str.inspect}*/"
end

def set_file(file)
Expand Down

0 comments on commit a3fccde

Please sign in to comment.