From 7cd9af19b618ee718b4ae0c099d6b45816d19f63 Mon Sep 17 00:00:00 2001 From: akouryy Date: Thu, 25 May 2023 00:45:19 +0900 Subject: [PATCH] Add warning.rbs --- Steepfile | 1 + sig/lrama/warning.rbs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 sig/lrama/warning.rbs diff --git a/Steepfile b/Steepfile index 12efa39a..a8d034a8 100644 --- a/Steepfile +++ b/Steepfile @@ -4,4 +4,5 @@ target :lib do signature "sig" check "lib/lrama/bitmap.rb" + check "lib/lrama/warning.rb" end diff --git a/sig/lrama/warning.rbs b/sig/lrama/warning.rbs new file mode 100644 index 00000000..264f0be0 --- /dev/null +++ b/sig/lrama/warning.rbs @@ -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