Created
January 23, 2018 16:23
-
-
Save anonymous/1662326c7d52f5ca0f3d9aade792d73c to your computer and use it in GitHub Desktop.
Snippet from https://play.nim-lang.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| macro loadTerms(): untyped = | |
| result = newNimNode(nnkStmtList) | |
| result.add(quote do: | |
| var KEYMAPSTRING_TABLE = initTable[string, string]() | |
| ) | |
| for term in walkFiles("term/*.txt"): | |
| result.add(quote do: | |
| KEYMAPSTRING_TABLE[term.splitFile().name] = staticRead(term) | |
| ) | |
| loadTerms() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment