From cb9f50986dbd2fd7a2f0dbf722714cbcb6e22324 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sun, 22 Dec 2024 22:49:14 +0900 Subject: [PATCH] Fix argument type of `find_symbol_by_s_value` and `find_symbol_by_s_value!` --- sig/lrama/grammar.rbs | 2 +- sig/lrama/grammar/symbols/resolver.rbs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sig/lrama/grammar.rbs b/sig/lrama/grammar.rbs index 9042525c..493c03bd 100644 --- a/sig/lrama/grammar.rbs +++ b/sig/lrama/grammar.rbs @@ -102,7 +102,7 @@ module Lrama def symbols: () -> Array[Grammar::Symbol] def terms: () -> Array[Grammar::Symbol] def nterms: () -> Array[Grammar::Symbol] - def find_symbol_by_s_value!: (Grammar::Symbol s_value) -> Grammar::Symbol + def find_symbol_by_s_value!: (::String s_value) -> Grammar::Symbol end end end diff --git a/sig/lrama/grammar/symbols/resolver.rbs b/sig/lrama/grammar/symbols/resolver.rbs index 0e4db130..4ec6fd16 100644 --- a/sig/lrama/grammar/symbols/resolver.rbs +++ b/sig/lrama/grammar/symbols/resolver.rbs @@ -14,8 +14,8 @@ module Lrama def sort_by_number!: () -> Array[Grammar::Symbol] def add_term: (id: Lexer::Token, ?alias_name: String?, ?tag: Lexer::Token::Tag?, ?token_id: Integer?, ?replace: bool) -> Grammar::Symbol def add_nterm: (id: Lexer::Token, ?alias_name: String?, ?tag: Lexer::Token::Tag?) -> Grammar::Symbol - def find_symbol_by_s_value: (Grammar::Symbol s_value) -> Grammar::Symbol? - def find_symbol_by_s_value!: (Grammar::Symbol s_value) -> Grammar::Symbol + def find_symbol_by_s_value: (::String s_value) -> Grammar::Symbol? + def find_symbol_by_s_value!: (::String s_value) -> Grammar::Symbol def find_symbol_by_id: (Lexer::Token id) -> Grammar::Symbol? def find_symbol_by_id!: (Lexer::Token id) -> Grammar::Symbol def find_symbol_by_token_id: (Integer token_id) -> Grammar::Symbol? @@ -47,7 +47,7 @@ module Lrama def find_symbol_by_number!: (Integer number) -> Grammar::Symbol def find_symbol_by_id!: (Lexer::Token id) -> Grammar::Symbol def token_to_symbol: (Lexer::Token token) -> Grammar::Symbol - def find_symbol_by_s_value!: (Grammar::Symbol s_value) -> Grammar::Symbol + def find_symbol_by_s_value!: (::String s_value) -> Grammar::Symbol def fill_nterm_type: (Array[Grammar::Type] types) -> void def fill_symbol_number: () -> void def fill_printer: (Array[Grammar::Printer] printers) -> void