summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAry Borenszweig <asterite@gmail.com>2017-08-02 11:13:59 -0300
committerAry Borenszweig <asterite@gmail.com>2017-08-02 13:57:51 -0300
commit5473c56cb6dc11a11e4bcae4adbe1d7971e79319 (patch)
tree00434353c13aa10a515a493fccaf9bf37ee3e001 /lib
parent4039a811248de7b0b9ae9e4a97854f00ba985255 (diff)
downloadpsych-5473c56cb6dc11a11e4bcae4adbe1d7971e79319.zip
Add Psych::Handler#event_location
This adds a new reported event to Psych::Handler, event_location, with precise start/end line/column information. The line/column information provided by Psych::Parser#mark is not very useful because it points to the location past the event.
Diffstat (limited to 'lib')
-rw-r--r--lib/psych/handler.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/psych/handler.rb b/lib/psych/handler.rb
index 1074c18..84a3b4f 100644
--- a/lib/psych/handler.rb
+++ b/lib/psych/handler.rb
@@ -242,6 +242,11 @@ module Psych
end
###
+ # Called before each event with line/column information.
+ def event_location(start_line, start_column, end_line, end_column)
+ end
+
+ ###
# Is this handler a streaming handler?
def streaming?
false