Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 534 Bytes

File metadata and controls

28 lines (19 loc) · 534 Bytes

morloclexer

A Pygments lexer for the Morloc language.

Installation

pip install morloclexer

Usage

Once installed, Pygments will automatically detect .loc files:

pygmentize -l morloc example.loc

Or use it in Python:

from pygments import highlight
from pygments.formatters import HtmlFormatter
from morloclexer.lexer import MorlocLexer

code = 'module main (*)\nimport math (sqrt)\n'
html = highlight(code, MorlocLexer(), HtmlFormatter())