Files
news.gitea.happylizard.me/bin/gems/rouge-4.7.0/lib/rouge/lexers/mojo.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

36 lines
820 B
Ruby

# -*- coding: utf-8 -*- #
# frozen_string_literal: true
module Rouge
module Lexers
load_lexer 'python.rb'
class Mojo < Python
title "Mojo"
desc "The Mojo programming language (modular.com)"
tag 'mojo'
aliases 'mojo'
filenames '*.mojo', '*.🔥'
mimetypes 'text/x-mojo', 'application/x-mojo'
def self.detect?(text)
return true if text.shebang?(/mojow?(?:[23](?:\.\d+)?)?/)
end
def self.keywords
@keywords ||= super + %w(
fn self alias out read mut owned ref var
struct trait raises with in match case
)
end
def self.builtins
@builtins ||= super + %w(
__mlir_attr __mlir_type __mlir_op parameter alwaysinline
register_passable
)
end
end
end
end