add symbolName() for macros

This commit is contained in:
2021-05-21 17:25:54 -06:00
parent f9dcfab167
commit ab032545f2
2 changed files with 9 additions and 0 deletions

View File

@@ -277,6 +277,14 @@ class Prelude {
return v;
}
// ReaderExp helpers for macros:
public static function symbolName(s:ReaderExp):ReaderExpDef {
return switch (s.def) {
case Symbol(name): StrExp(name);
default: throw 'expected $s to be a plain symbol';
};
}
#if sys
private static var kissProcess:Process = null;
#end