From seed to Twig: soft introduction to the Compiling Theory

From seed to Twig: soft introduction to the Compiling Theory

Speaker(s)
the-true-mamoot
Duration
Session track
Code & Development
Experience level
Intermediate
Description

Dive deep into the heart of Twig's compilation process and discover how your templates transform into optimized PHP code. This technical talk unveils the inner workings of Twig's architecture, exploring each stage of template compilation through the lens of fundamental compiler theory. We'll examine how the Lexer breaks down raw template syntax into tokens, how the Parser constructs an Abstract Syntax Tree, and how the Compiler ultimately generates efficient PHP code. Using real-world Drupal template examples, we'll trace the journey of a template through each compilation phase, gaining practical insights that will enhance your template debugging skills and help you write more efficient Twig code. Whether you're debugging complex template issues or simply curious about template engines, this session will give you a stronger foundation in both Twig and compilation principles.
Maybe, this session will be inspire you to craft your own Interpreter !