A parser to map Arduino code into the VFC tools
pip install clang-format
Created in just a few hours, this preliminary parser helps safeguard your Arduino sketches by making backups and enhancing readability.
The backup file is: _filename.ino
Designed for Arduino-formatted indentation, this tool aims to improve code organization and clarity.
- A Python-based parser tailored for Arduino sketches
- Inserts
#begin.../#end...comments (#endfunc,#endif,#endloop, etc.) - Makes block structures explicitly visible—beyond just indentation
- Format the file
- Add structure tags
- Map structure comments to VFC tokens
Once annotated, the file is fed into VFCode, a visual flow graph renderer. This reveals the full logical structure in a visual, explorable format that integrates with the Arduino IDE.
void loop() {
if (sensorReading > threshold) {
activateMotor();
}
}
### After
void loop() { #beginloop
if (sensorReading > threshold) { #beginif
activateMotor();
} #endif
} #endloop
