remove lines and columns
This commit is contained in:
parent
b420bb4993
commit
4fa00371e5
@ -2,17 +2,8 @@ module Asm
|
|||||||
|
|
||||||
class Node
|
class Node
|
||||||
def initialize(s = nil)
|
def initialize(s = nil)
|
||||||
if (s)
|
|
||||||
@line = s.prev_line
|
|
||||||
@column = s.prev_column
|
|
||||||
else
|
|
||||||
@line = 0
|
|
||||||
@column = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
yield self if block_given?
|
yield self if block_given?
|
||||||
end
|
end
|
||||||
attr_reader :line, :column
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class ToplevelNode < Node
|
class ToplevelNode < Node
|
||||||
@ -71,10 +62,6 @@ module Asm
|
|||||||
class ParseError < StandardError
|
class ParseError < StandardError
|
||||||
def initialize(message, s)
|
def initialize(message, s)
|
||||||
super(message)
|
super(message)
|
||||||
|
end
|
||||||
@line = s.line
|
|
||||||
@column = s.column
|
|
||||||
end
|
|
||||||
attr_reader :line, :column
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user