irishman 1.0.0 copy "irishman: ^1.0.0" to clipboard
irishman: ^1.0.0 copied to clipboard

discontinued

A generic programming language interpreter, linter, formatter, and all that jazz, written in Dart.

example/irishman_example.dart

import 'package:irishman/irishman.dart';

void main() {
  var tokenizer = const Tokenizer(
    keywords: [
      Keyword("if"),
      Keyword("else"),
    ],
    symbols: [
      Symbol(">=", "Greater than or equals"),
      Symbol("(", "Start Paren"),
      Symbol(")", "End Paren"),
      Symbol("{", "Increase Scope"),
      Symbol("}", "Decrease Scope"),
    ],
  );

  print(
      'All the token constants are: \n - ${tokenizer.getAllTokenNames().join("\n - ")}');

  print("");
  print("The output to `if (4 >= 4) { } else { }` is:");
  print(tokenizer
      .tokenizeString("if(4>=5){}else{}")
      .map((e) => "${e.tokenName}:${e.data}")
      .join(", "));
}
2
likes
0
pub points
0%
popularity

Publisher

verified publisherfairfieldprogramming.org

A generic programming language interpreter, linter, formatter, and all that jazz, written in Dart.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on irishman