The compiler takes in simple code describing different shapes, and generates corresponding SVG code and image. The SVG Code can then be downloaded for further use.
The SVG compiler has 4 phases
1. Lexer - This function is used to generate tokens from the input file
2. Parser - Parser parses the generated tokens and creates an Abstract Syntax Tree (AST)
3. Transformer - This function transforms the AST to get it into SVG format
4. Generator - This function is used to generate the SVG code from the SVG tree created by Transformer function
Line, Rectangle, Circle and Ellipse
Clone this repository: git clone https://github.com/riyasavant/svg-compiler.git
Install all dependencies: yarn
Run the application: yarn start