Class: HH::Syntax::Default

Inherits:
Object show all
Defined in:
lib/ext/highlighter/common.rb

Overview

A default tokenizer for handling syntaxes that are not explicitly handled elsewhere. It simply yields the given text as a single token.

Instance Method Summary collapse

Instance Method Details

#tokenize(text) {|Token.new( text, :normal )| ... } ⇒ Object

Yield the given text as a single token.

Yields:

  • (Token.new( text, :normal ))


168
169
170
# File 'lib/ext/highlighter/common.rb', line 168

def tokenize( text )
  yield Token.new( text, :normal )
end