ToyIDE
ToyIDE is an imitation of a full-featured IDE plus a toy language with an interpreter and a compiler. All the parts were built from scratch in Scala, without relying on any existing code or libraries.
The project is purely educational. It is a product of a long vacation in the country and a desire to learn how all this stuff really works.
Although I employed an evolutionary design in the development (to uncover the reasons behind architecture), it turns out that many techniques in the code come close to commonly used patterns. I learned a lot from the project and hope it might be useful to the people who want to know more about lexers, parsers, AST, Java bytecode and other similar fun, but tricky things.
Screenshots | Features | Downloads | Resources
Screenshots
Features
- Pluggable languages (plus a simple imperative, statically typed language).
- Syntax and error highlighting, inspections:
- Editor with selection, copy/paste, undo/redo, braces balancing, auto-indentation.
- Split editing:
- Brace matching:
- Show usages:
- Autocompletion (identifiers, keywords):
- Code formatting:

↓
- Rename refactoring:

↓
- Control flow analysis:
- Code optimization:
- Structure pane:
- Interpreter:
- Compiler (with static optimizations):
- JVM class export:
Downloads
ToyIDE binaries: toyide-1.0-bin.zip (10MB)
Resources
Project is available as a GitHub repository.
- Source code is 100% Scala.
- Maven pom.xml is provided.
- There are 577 unit tests (running time is less than 3 seconds).
