Skip to content

Commit

Permalink
implement #@warn simply. Closes: #1258
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Jan 23, 2019
1 parent b2799aa commit 8f7491d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/review/preprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def preproc(f)
when /\A\#@/
op = line.slice(/@(\w+)/, 1)
warn "unknown directive: #{line.strip}" unless known_directive?(op)
if op == 'warn'
warn line.strip.sub(/\#@warn\((.+)\)/, '\1')
end
@f.print line

when /\A\s*\z/ # empty line
Expand Down

0 comments on commit 8f7491d

Please sign in to comment.