This project is a TypeScript-based lexer that converts Markdown input into LaTeX output. The lexer tokenizes the Markdown text, parses it into an Abstract Syntax Tree (AST), and then generates the corresponding LaTeX code. To install dependencies:
To get started, clone the repository and install the necessary dependencies:
git clone https://github.com/shadmeoli/latex_lexer.git
cd latex_lexer
bun install
To run:
bun run index.ts
latex_lexer/
├── src/
│ ├── lexer.ts
│ ├── parser.ts
│ ├── generator.ts
│ └── index.ts
├── .gitignore
├── package.json
├── README.md
└── tsconfig.json
- src/lexer.ts: Contains the lexer logic to tokenize Markdown input.
- src/parser.ts: Contains the parser logic to convert tokens into an AST.
- src/generator.ts: Contains the generator logic to convert the AST into LaTeX code.
- src/index.ts: Main entry point tying everything together.
Contributions are welcome! Please fork the repository and create a pull request with your changes. Make sure to follow the coding style and include tests for any new features or bug fixes.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Create a pull request