Add Rule#id
This commit is contained in:
1 parent
9d850294a9
commit
2837dfda6b
2 files changed
+9
-2
No files matched your search
+8
-1
@@ -10,6 +10,10 @@ class Propane
|
||||
# User code associated with the rule.
|
||||
attr_reader :code
|
||||
|
||||
# @return [Integer]
|
||||
# Rule ID.
|
||||
attr_reader :id
|
||||
|
||||
# @return [Integer]
|
||||
# Line number where the rule was defined in the input grammar.
|
||||
attr_reader :line_number
|
||||
@@ -28,10 +32,13 @@ class Propane
|
||||
# User code associated with the rule.
|
||||
# @param line_number [Integer]
|
||||
# Line number where the rule was defined in the input grammar.
|
||||
def initialize(name, components, code, line_number)
|
||||
# @param id [Integer]
|
||||
# Rule ID.
|
||||
def initialize(name, components, code, line_number, id)
|
||||
@name = name
|
||||
@components = components
|
||||
@code = code
|
||||
@id = id
|
||||
@line_number = line_number
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user