Class: Twig::TokenParser::Extends
- Defined in:
- lib/twig/token_parser/extends.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Instance Method Details
#parse(token) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/twig/token_parser/extends.rb', line 6 def parse(token) stream = parser.stream if parser.peek_block_stack raise Error::Syntax.new('Cannot raise from inside a block', token.lineno, stream.source) # elsif parser.main_scope? @todo end parser.parent = parser.expression_parser.parse_expression stream.expect(Token::BLOCK_END_TYPE) Node::Empty.new(token.lineno) end |
#tag ⇒ Object
20 21 22 |
# File 'lib/twig/token_parser/extends.rb', line 20 def tag 'extends' end |