diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-05-01 01:32:45 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-05-01 01:32:45 +0200 |
| commit | f3a8b2626aa5d541dfaf9c63a911e1893c0f4ba9 (patch) | |
| tree | 28616236a749887dd91101cdc6d7d541ab92c7de /Rakefile | |
| parent | 23b7a1ab308442777a32c3bd123e68ad98369c42 (diff) | |
| download | elna-f3a8b2626aa5d541dfaf9c63a911e1893c0f4ba9.tar.gz | |
Add semicolons separating the statements
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 33 |
1 files changed, 0 insertions, 33 deletions
@@ -66,36 +66,3 @@ end file 'build/stage2b' => ['build/stage2b.s', 'boot/common-boot.s'] do |t| sh CROSS_GCC, '-nostdlib', '-o', t.name, *t.prerequisites end - -desc 'Print remaining lines to rewrite' -task :statistics do - def is_false_positive(word) - word.start_with?('(*') || - word.start_with?('*)') || - ('A'..'Z').include?(word[0]) || - /^[[:alpha:]][[:digit:]]$/.match(word) || - ['end', 'if'].include?(word) - end - - lines = File.read('boot/stage2.elna') - .split("\n") - .select { |line| line.start_with? "\t" } - .map { |line| line.delete_prefix("\t").split(' ') } - .reject { |words| is_false_positive(words.first) } - .group_by do |words| - if words.first.length < 5 - case words.first - when 'goto' - 'Statements' - else - words.first - end - else - 'Statements' - end - end - - lines.each do |key, value| - puts "#{key}: #{value.count}" - end -end |
