Make RuleSet#id read-only
This commit is contained in:
parent
6daca1e73f
commit
0a7938038b
@ -24,14 +24,8 @@ class Propane
|
|||||||
}
|
}
|
||||||
states = mode_info[:dfa].enumerate
|
states = mode_info[:dfa].enumerate
|
||||||
states.each do |state, id|
|
states.each do |state, id|
|
||||||
token =
|
token = state.accepts && state.accepts.token && state.accepts.token.id
|
||||||
if state.accepts && state.accepts.token
|
code_id = state.accepts && state.accepts.code_id && state.accepts.code_id
|
||||||
state.accepts.token.id
|
|
||||||
end
|
|
||||||
code_id =
|
|
||||||
if state.accepts && state.accepts.code_id
|
|
||||||
state.accepts.code_id
|
|
||||||
end
|
|
||||||
state_table << {
|
state_table << {
|
||||||
transition_table_index: transition_table.size,
|
transition_table_index: transition_table.size,
|
||||||
n_transitions: state.transitions.size,
|
n_transitions: state.transitions.size,
|
||||||
|
@ -4,7 +4,7 @@ class Propane
|
|||||||
|
|
||||||
# @return [Integer]
|
# @return [Integer]
|
||||||
# ID of the RuleSet.
|
# ID of the RuleSet.
|
||||||
attr_accessor :id
|
attr_reader :id
|
||||||
|
|
||||||
# @return [String]
|
# @return [String]
|
||||||
# Name of the RuleSet.
|
# Name of the RuleSet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user