diff --git a/sig/lrama/grammar/parameterizing_rules/builder.rbs b/sig/lrama/grammar/parameterizing_rules/builder.rbs index a2c8ba07..8dcc6f07 100644 --- a/sig/lrama/grammar/parameterizing_rules/builder.rbs +++ b/sig/lrama/grammar/parameterizing_rules/builder.rbs @@ -7,14 +7,15 @@ module Lrama @token: Lexer::Token::Parameterizing @key: Symbol @rule_counter: Counter - @lhs: Lexer::Token + @lhs_tag: untyped @user_code: Lexer::Token::UserCode? @precedence_sym: Lexer::Token? @line: Integer? + @builder: Grammar::ParameterizingRules::Builder::Base def initialize: (Lexer::Token token, Counter rule_counter, untyped lhs_tag, Lexer::Token::UserCode? user_code, Lexer::Token? precedence_sym, Integer? line) -> void def build: () -> Array[Rule] - def build_token: () -> Lrama::Lexer::Token + def build_token: () -> Lexer::Token def create_builder: () -> void def validate_key!: () -> void end diff --git a/sig/lrama/grammar/parameterizing_rules/builder/base.rbs b/sig/lrama/grammar/parameterizing_rules/builder/base.rbs index 466bd0ce..e52a5878 100644 --- a/sig/lrama/grammar/parameterizing_rules/builder/base.rbs +++ b/sig/lrama/grammar/parameterizing_rules/builder/base.rbs @@ -3,6 +3,8 @@ module Lrama class ParameterizingRules class Builder class Base + attr_reader build_token: Lexer::Token::Ident + def initialize: (Lexer::Token::Parameterizing token, Counter rule_counter, untyped lhs_tag, Lexer::Token::UserCode? user_code, Lexer::Token? precedence_sym, Integer? line) -> void def build: () -> Array[Rule] @@ -10,7 +12,7 @@ module Lrama @token: Lexer::Token::Parameterizing @key: Symbol @rule_counter: Counter - @lhs: Lexer::Token + @lhs_tag: untyped @user_code: Lexer::Token::UserCode? @precedence_sym: Lexer::Token? @line: Integer? diff --git a/sig/lrama/grammar/parameterizing_rules/builder/separated_list.rbs b/sig/lrama/grammar/parameterizing_rules/builder/separated_list.rbs index dbdf6629..0f60670d 100644 --- a/sig/lrama/grammar/parameterizing_rules/builder/separated_list.rbs +++ b/sig/lrama/grammar/parameterizing_rules/builder/separated_list.rbs @@ -3,6 +3,8 @@ module Lrama class ParameterizingRules class Builder class SeparatedList < Base + @separator: Lexer::Token + def initialize: (Lexer::Token token, Counter rule_counter, untyped lhs_tag, Lexer::Token::UserCode? user_code, Lexer::Token? precedence_sym, Integer? line) -> void end end diff --git a/sig/lrama/grammar/parameterizing_rules/builder/separated_nonempty_list.rbs b/sig/lrama/grammar/parameterizing_rules/builder/separated_nonempty_list.rbs index 461ce0ab..21cf3322 100644 --- a/sig/lrama/grammar/parameterizing_rules/builder/separated_nonempty_list.rbs +++ b/sig/lrama/grammar/parameterizing_rules/builder/separated_nonempty_list.rbs @@ -3,6 +3,8 @@ module Lrama class ParameterizingRules class Builder class SeparatedNonemptyList < Base + @separator: Lexer::Token + def initialize: (Lexer::Token token, Counter rule_counter, untyped lhs_tag, Lexer::Token::UserCode? user_code, Lexer::Token? precedence_sym, Integer? line) -> void end end diff --git a/sig/lrama/lexer/token/parameterizing.rbs b/sig/lrama/lexer/token/parameterizing.rbs index 351beaf2..92f5d3bb 100644 --- a/sig/lrama/lexer/token/parameterizing.rbs +++ b/sig/lrama/lexer/token/parameterizing.rbs @@ -2,9 +2,9 @@ module Lrama class Lexer class Token class Parameterizing < Token - attr_accessor args: Array[Lrama::Lexer::Token] + attr_accessor args: Array[Lexer::Token] - def initialize: (s_value: String, ?alias_name: String, ?location: Location, ?args: Array[Lrama::Lexer::Token]) -> void + def initialize: (s_value: String, ?alias_name: String, ?location: Location, ?args: Array[Lexer::Token]) -> void def option?: () -> bool def nonempty_list?: () -> bool