irishman 1.0.4 irishman: ^1.0.4 copied to clipboard
A generic programming language interpreter, linter, formatter, and all that jazz, written in Dart.
import 'package:irishman/irishman.dart';
void main() {
var language = Language.fromJSONFile("./example/simple-lang.json");
var tokenizer = language.getTokenizer();
print(
'All the token constants in "${language.emoji} ${language.name}" are: \n - ${tokenizer.getAllTokenNames().join("\n - ")}');
print("");
print("The output to `if (4 >= 4) { } else { }` is:");
print(tokenizer
.tokenizeString("var constant = 4;")
.map((e) => "${e.tokenName}:${e.data}")
.join(", "));
}