diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-27 15:17:51 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-27 15:17:51 -0700 |
commit | 56c5edfd2141145f2c3aa1f7010cf2e41a7e8662 (patch) | |
tree | 51348546a1f4f0ae0916cbc315f940f5d7277d8d /lib | |
parent | 6d0f682f6ab3289c3150d1da120b1d90e6913e0b (diff) | |
download | psych-56c5edfd2141145f2c3aa1f7010cf2e41a7e8662.zip |
start_sequence implemented
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych.rb | 5 | ||||
-rw-r--r-- | lib/psych/parser/handler.rb | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/psych.rb b/lib/psych.rb index a695b0a..812891e 100644 --- a/lib/psych.rb +++ b/lib/psych.rb @@ -19,6 +19,11 @@ module Psych LITERAL_SCALAR_STYLE = 4 FOLDED_SCALAR_STYLE = 5 + # Sequence Styles + ANY_SEQUENCE_STYLE = 0 + BLOCK_SEQUENCE_STYLE = 1 + FLOW_SEQUENCE_STYLE = 2 + def self.parse thing Psych::Parser.new.parse thing end diff --git a/lib/psych/parser/handler.rb b/lib/psych/parser/handler.rb index 9cb8281..b2706c1 100644 --- a/lib/psych/parser/handler.rb +++ b/lib/psych/parser/handler.rb @@ -27,7 +27,12 @@ module Psych ### # Called when a scalar +value+ is found. The scalar may have an # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+ - def scalar value, anchor = nil, tag = nil, plain = true, quoted = true, style = 0 + def scalar value, anchor = nil, tag = nil, plain = true, quoted = true, style = ANY_SCALAR_STYLE + end + + ### + # Called when a sequence is started. + def start_sequence anchor = nil, tag = nil, implicit = true, style = BLOCK_SEQUENCE_STYLE end ### |