Lines Matching defs:new
16 @template_library ||= ANTLR3::Template::Group.new
40 self.class.template_library or ANTLR3::Template::Group.new
49 @templates.new( source, values )
69 when TokenSource then TokenRewriteStream.new( input, options )
72 TokenRewriteStream.new( lexer_class.new( input, options ), options )
96 lexer = Lexer.new( source, options )
97 parser = Parser.new( lexer, options )
109 input = ANTLR3::FileStream.new( group_file, options )
110 lexer = Lexer.new( input, options )
111 parser = Parser.new( lexer, options )
115 def self.new( &block )
122 def new( source, values = {} )
123 erb = ERB.new( source, nil, '%' )
124 template = Context.new( values )
132 self::TEMPLATES.fetch( name.to_s ).new( values )
147 ERB.new( source, nil, '%' ).def_method( tclass, 'to_s' )
181 TEMPLATES[ #{ name.inspect } ].new do | ___ |
187 TEMPLATES[ #{ name.inspect } ].new do | ___ |
199 TEMPLATES[ #{ name.inspect } ].new( values )
203 TEMPLATES[ #{ name.inspect } ].new( values ).to_s
221 new = clone
222 new.name = name
223 new.group = @group
224 block_given? and yield( new )
225 return( new )
229 Class.new( self ) do
286 Parameter = Struct.new( :name, :default )
297 new.add( :values ) do | p |
313 else Parameter.new( name.to_s )