diff options
author | Ary Borenszweig <asterite@gmail.com> | 2017-08-02 11:13:59 -0300 |
---|---|---|
committer | Ary Borenszweig <asterite@gmail.com> | 2017-08-02 13:57:51 -0300 |
commit | 5473c56cb6dc11a11e4bcae4adbe1d7971e79319 (patch) | |
tree | 00434353c13aa10a515a493fccaf9bf37ee3e001 /lib | |
parent | 4039a811248de7b0b9ae9e4a97854f00ba985255 (diff) | |
download | psych-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.rb | 5 |
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 |