Initial Revision
[ohcount] / ext / ohcount_native / glots / clearsilver_template_polyglot.rb
1 require 'polyglot'
2
3 module Ohcount
4         class ClearsilverTemplate < Polyglot
5
6                 def initialize(name, html, clearsilver)
7                         @name = name
8
9                         @states = html.all_states + clearsilver.states
10                         @extra_states = []
11
12                         @transitions = html.all_transitions + clearsilver.transitions
13                         @extra_transitions = []
14
15                         # stitch phplanguage
16                         @extra_transitions << StitchTransition.new(e("<?cs"), :html_markup, :clearsilver_code, :from, false, name)
17                         @extra_transitions << StitchTransition.new(e("<?cs"), :html_comment, :clearsilver_code, :from, false, name)
18                         @extra_transitions << StitchTransition.new(e("<?cs"), :html_squote, :clearsilver_code, :from, false, name)
19                         @extra_transitions << StitchTransition.new(e("<?cs"), :html_dquote, :clearsilver_code, :from, false, name)
20                         @extra_transitions << StitchTransition.new(e("?>"), :clearsilver_code, :return, :to, false, name)
21                 end
22         end
23 end