Make RuleSet#id read-only

This commit is contained in:
Josh Holtrop 2023-07-08 11:17:11 -04:00
parent 6daca1e73f
commit 0a7938038b
2 changed files with 3 additions and 9 deletions

View File

@ -24,14 +24,8 @@ class Propane
}
states = mode_info[:dfa].enumerate
states.each do |state, id|
token =
if state.accepts && state.accepts.token
state.accepts.token.id
end
code_id =
if state.accepts && state.accepts.code_id
state.accepts.code_id
end
token = state.accepts && state.accepts.token && state.accepts.token.id
code_id = state.accepts && state.accepts.code_id && state.accepts.code_id
state_table << {
transition_table_index: transition_table.size,
n_transitions: state.transitions.size,

View File

@ -4,7 +4,7 @@ class Propane
# @return [Integer]
# ID of the RuleSet.
attr_accessor :id
attr_reader :id
# @return [String]
# Name of the RuleSet.