Skip to content

Instantly share code, notes, and snippets.

@evjava
evjava / text-resource.kt
Created July 25, 2022 13:57
Abstracting Android text resources
//// inspired by https://hannesdorfmann.com/abstraction-text-resource/
// TextResource.kt
sealed class TextResource {
class Raw(val str: String) : TextResource()
class TextId(val id: Int) : TextResource()
class TextIdArgString(val id: Int, val arg: String) : TextResource()
class TextIdArgInt(val id: Int, val arg: Int) : TextResource()
class TextIdArgId(val id: Int, val argRes: Int) : TextResource()
class TextList(val texts: List<TextResource>) : TextResource()
@evjava
evjava / lama-mode.el
Last active April 27, 2023 09:11
Lama mode for Emacs
;;; lama-mode.el --- Major mode for Lama -*- coding: utf-8; lexical-binding: t; -*-
;; Copyright © 2020 Eugene Tagin
;; Author: Eugene Tagin (evjava@yandex.ru)
;; Keywords: languages
;; Package-Requires: ((emacs "24.3"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by