π Tart
Tiny Dart, Big Impact! π Note: Tart is currently in the early stages of development and is not yet ready for production use.
π Features
- π― Lightweight Dart parser
- π§© Modular and extensible design
- π¦ Comprehensive token handling
- π³ Abstract Syntax Tree (AST) generation
- π§ͺ Thoroughly tested
π Getting Started
Add tart_dev to your pubspec.yaml:
dependencies:
tart_dev: ^0.0.1
then run:
dart pub get
π Usage
Here's a quick example of how to use Tart:
import 'package:tart_dev/tart.dart';
void main() {
final source = 'var x = 42;';
final lexer = Lexer(source);
final tokens = lexer.scanTokens();
final parser = Parser(tokens);
final ast = parser.parse();
print('Tokens: $tokens');
print('AST: $ast');
}
For more examples, check out the /example folder in our GitHub repository.
π οΈ API Reference
Tart provides the following main classes:
Lexer: Tokenizes the input source codeParser: Generates an AST from tokensToken: Represents individual lexical unitsAST: Various AST node classes for different language constructs
For detailed API documentation, visit our API reference page.
Why Tart?
Tart offers several advantages for Flutter development:
- Flutter-focused: Optimized specifically for Flutter applications
- Familiar syntax: Nearly identical to Dart, minimizing learning curve
- Performance: Designed for efficiency in Flutter-specific use cases
- Developer experience: Intuitive API and enhanced tooling support
- Faster development: Enables quicker iterations on dynamic code
- Improved debugging: Detailed, Flutter-specific error messages
- Smaller footprint: Minimal impact on overall app size
- Focused feature set: Polished core functionalities for common Flutter scenarios
Tart provides a specialized, Flutter-centric solution for dynamic code execution, offering improved performance and an enhanced developer experience.
π€ Contributing
We welcome contributions! Please see our contributing guide for more details.
π License
Tart is released under the MIT License. See the LICENSE file for details.
π Support
If you find Tart helpful, consider giving it a star on GitHub and sharing it with others!
Made with π by the Tart Dev team