1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
# encoding: utf-8
require_relative '../../hocon/impl'
require_relative '../../hocon/config_error'
require_relative '../../hocon/impl/config_node_single_token'
require_relative '../../hocon/impl/tokens'
class Hocon::Impl::ConfigNodeComment < Hocon::Impl::ConfigNodeSingleToken
def initialize(comment)
super(comment)
unless Hocon::Impl::Tokens.comment?(@token)
raise Hocon::ConfigError::ConfigBugOrBrokenError, 'Tried to create a ConfigNodeComment from a non-comment token'
end
end
def comment_text
Hocon::Impl::Tokens.comment_text(@token)
end
end
|