From b5aecfbd9d32bf894ab82d7b594f91a5f59acb2a Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Tue, 6 Sep 2022 22:54:36 +1200 Subject: Add supported languages flag --- src/flint.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/flint.cr b/src/flint.cr index a14e0c8..6d68305 100644 --- a/src/flint.cr +++ b/src/flint.cr @@ -61,6 +61,11 @@ module Flint parser.on("-m CELLS", "--memory-size=CELLS", "specify the number of memory cells available, defaults vary depending on language") do |_cells| language_options[:memory_size] = _cells end + parser.on("--supported-languages", "print a list of languages supported by flinti and exit") do + puts "Languages supported by flint (not guaranteed to be fully implemented):" + Language.names.each { |name| puts name } + exit(0) + end parser.unknown_args do |_args| crash("ERROR: No language chosen", parser) if _args.size == 0 -- cgit v1.2.1