class Hocon::Impl::Tokenizer
Constants
- ConfigBugOrBrokenError
- Tokens
Public Class Methods
Source
# File lib/hocon/impl/tokenizer.rb, line 24 def self.as_string(codepoint) if codepoint == "\n" "newline" elsif codepoint == "\t" "tab" elsif codepoint == -1 "end of file" elsif codepoint =~ /[[:cntrl:]]/ "control character 0x%x" % codepoint else "%c" % codepoint end end
Source
# File lib/hocon/impl/tokenizer.rb, line 44 def self.render(tokens) rendered_text = "" while (t = tokens.next) rendered_text << t.token_text end rendered_text end
Source
# File lib/hocon/impl/tokenizer.rb, line 40 def self.tokenize(origin, input, syntax) TokenIterator.new(origin, input, syntax != Hocon::ConfigSyntax::JSON) end
Tokenizes a Reader. Does not close the reader; you have to arrange to do that after you’re done with the returned iterator.