Class: Syntax::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax.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 ))


10
11
12
# File 'lib/syntax.rb', line 10

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