blob: f371120402054c078ccf549e8eed7d0f2d6f2555 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# -*- 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
|