Skip to content

Commit

Permalink
If already included, change to not add
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Oct 14, 2023
1 parent 124135b commit 929f27b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/lrama/new_parser.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def next_token
end

def prologue(s_value)
if @header_path
if @header_path && !s_value.match?(/^\s*#include\s+"#{@header_path}"/)
"\n#include \"#{@header_path}\"\n" + s_value
else
s_value
Expand Down

0 comments on commit 929f27b

Please sign in to comment.