Skip to content

Commit

Permalink
Merge pull request #23 from akouryy/warning-rbs
Browse files Browse the repository at this point in the history
Add warning.rbs
  • Loading branch information
yui-knk authored May 26, 2023
2 parents d4294c3 + 7cd9af1 commit c895c70
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ target :lib do
signature "sig"

check "lib/lrama/bitmap.rb"
check "lib/lrama/warning.rb"
end
16 changes: 16 additions & 0 deletions sig/lrama/warning.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module Lrama
class Warning
interface _Appendable
def <<: (String message) -> self
end

@out: _Appendable

attr_reader errors: Array[String]
attr_reader warns: Array[String]
def initialize: (?_Appendable out) -> void
def error: (String message) -> void
def warn: (String message) -> void
def has_error?: -> bool
end
end

0 comments on commit c895c70

Please sign in to comment.