Skip to content

Rewrite to rbs_inline style type definitions for Lrama::Grammar::Auxiliary #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/lrama/grammar/auxiliary.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# rbs_inline: enabled
# frozen_string_literal: true

module Lrama
class Grammar
# Grammar file information not used by States but by Output
class Auxiliary < Struct.new(:prologue_first_lineno, :prologue, :epilogue_first_lineno, :epilogue, keyword_init: true)
# @rbs!
# attr_accessor prologue_first_lineno: Integer
# attr_accessor prologue: String
# attr_accessor epilogue_first_lineno: Integer
# attr_accessor epilogue: String
#
# def initialize: (?prologue_first_lineno: Integer, ?prologue: String, ?epilogue_first_lineno: Integer, ?epilogue: String) -> void
end
end
end
18 changes: 18 additions & 0 deletions sig/generated/lrama/grammar/auxiliary.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated from lib/lrama/grammar/auxiliary.rb with RBS::Inline

module Lrama
class Grammar
# Grammar file information not used by States but by Output
class Auxiliary
attr_accessor prologue_first_lineno: Integer

attr_accessor prologue: String

attr_accessor epilogue_first_lineno: Integer

attr_accessor epilogue: String

def initialize: (?prologue_first_lineno: Integer, ?prologue: String, ?epilogue_first_lineno: Integer, ?epilogue: String) -> void
end
end
end
10 changes: 0 additions & 10 deletions sig/lrama/grammar/auxiliary.rbs

This file was deleted.