katbin/lib/ketbin/utils/syntax.ex
SphericalKat 425fb2b571
feat(pastes): use rustler for highlight NIF
Signed-off-by: SphericalKat <amolele@gmail.com>
2021-08-17 02:05:58 +05:30

11 lines
297 B
Elixir

defmodule Ketbin.Utils.Syntax do
use Rustler, otp_app: :ketbin, crate: "ketbin_utils_syntax"
# When your NIF is loaded, it will override this function.
def add(_a, _b), do: error()
def highlight_text(_text, _lang), do: error()
defp error(), do: :erlang.nif_error(:nif_not_loaded)
end