Skip to content
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
7 changes: 4 additions & 3 deletions Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ target :lib do
repo_path '.gem_rbs_collection/'
signature "sig"

check "lib/lrama/grammar"

check "lib/lrama/counterexamples"
check "lib/lrama/grammar"
check "lib/lrama/lexer"
check "lib/lrama/report"
check "lib/lrama/state"
check "lib/lrama/states"
check "lib/lrama/tracer"
check "lib/lrama/warnings"
check "lib/lrama/bitmap.rb"
check "lib/lrama/counterexamples.rb"
check "lib/lrama/digraph.rb"
check "lib/lrama/grammar.rb"
check "lib/lrama/logger.rb"
check "lib/lrama/options.rb"
check "lib/lrama/trace_reporter.rb"
check "lib/lrama/tracer.rb"
end
6 changes: 3 additions & 3 deletions lib/lrama/tracer/actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
module Lrama
class Tracer
class Actions
# @rbs (IO io, **untyped _) -> void
def initialize(io, **options)
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize(io, actions: false, **options)
@io = io
@actions = options[:actions]
@actions = actions
end

# @rbs (Lrama::Grammar grammar) -> void
Expand Down
2 changes: 1 addition & 1 deletion lib/lrama/tracer/closure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Lrama
class Tracer
class Closure
# @rbs (IO io, bool automaton, bool closure, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize(io, automaton: false, closure: false, **_)
@io = io
@closure = automaton || closure
Expand Down
2 changes: 1 addition & 1 deletion lib/lrama/tracer/only_explicit_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Lrama
class Tracer
class OnlyExplicitRules
# @rbs (IO io, only_explicit: false, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize(io, only_explicit: false, **_)
@io = io
@only_explicit = only_explicit
Expand Down
2 changes: 1 addition & 1 deletion lib/lrama/tracer/rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Lrama
class Tracer
class Rules
# @rbs (IO io, bool rules, bool only_explicit, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize(io, rules: false, only_explicit: false, **_)
@io = io
@rules = rules
Expand Down
2 changes: 1 addition & 1 deletion lib/lrama/tracer/state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Lrama
class Tracer
class State
# @rbs (IO io, bool automaton, bool closure, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize(io, automaton: false, closure: false, **_)
@io = io
@state = automaton || closure
Expand Down
4 changes: 2 additions & 2 deletions sig/generated/lrama/tracer/actions.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module Lrama
class Tracer
class Actions
# @rbs (IO io, **untyped _) -> void
def initialize: (IO io, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize: (IO io, **Hash[Symbol, bool]) -> void

# @rbs (Lrama::Grammar grammar) -> void
def trace: (Lrama::Grammar grammar) -> void
Expand Down
4 changes: 2 additions & 2 deletions sig/generated/lrama/tracer/closure.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module Lrama
class Tracer
class Closure
# @rbs (IO io, bool automaton, bool closure, **untyped _) -> void
def initialize: (IO io, bool automaton, bool closure, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize: (IO io, **Hash[Symbol, bool]) -> void

# @rbs (Lrama::State state) -> void
def trace: (Lrama::State state) -> void
Expand Down
4 changes: 2 additions & 2 deletions sig/generated/lrama/tracer/only_explicit_rules.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module Lrama
class Tracer
class OnlyExplicitRules
# @rbs (IO io, only_explicit: false, **untyped _) -> void
def initialize: (IO io, only_explicit: false, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize: (IO io, **Hash[Symbol, bool]) -> void

# @rbs (Lrama::Grammar grammar) -> void
def trace: (Lrama::Grammar grammar) -> void
Expand Down
4 changes: 2 additions & 2 deletions sig/generated/lrama/tracer/rules.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module Lrama
class Tracer
class Rules
# @rbs (IO io, bool rules, bool only_explicit, **untyped _) -> void
def initialize: (IO io, bool rules, bool only_explicit, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize: (IO io, **Hash[Symbol, bool]) -> void

# @rbs (Lrama::Grammar grammar) -> void
def trace: (Lrama::Grammar grammar) -> void
Expand Down
4 changes: 2 additions & 2 deletions sig/generated/lrama/tracer/state.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module Lrama
class Tracer
class State
# @rbs (IO io, bool automaton, bool closure, **untyped _) -> void
def initialize: (IO io, bool automaton, bool closure, **untyped _) -> void
# @rbs (IO io, **Hash[Symbol, bool]) -> void
def initialize: (IO io, **Hash[Symbol, bool]) -> void

# @rbs (Lrama::State state) -> void
def trace: (Lrama::State state) -> void
Expand Down
1 change: 1 addition & 0 deletions sig/lrama/grammar.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module Lrama
attr_reader error_symbol: Grammar::Symbol
attr_reader undef_symbol: Grammar::Symbol
attr_reader accept_symbol: Grammar::Symbol
attr_reader parameterized_resolver: Parameterized::Resolver
attr_reader aux: Auxiliary
attr_accessor union: Union
attr_accessor expect: Integer
Expand Down
2 changes: 2 additions & 0 deletions sig/lrama/grammar/rule.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ module Lrama

def display_name: () -> String

def display_name_without_action: () -> String

def as_comment: -> String

def empty_rule?: -> bool
Expand Down