Files changed (3)
elif kind == clang.cindex.CursorKind.TYPE_REF and node.type.kind == clang.cindex.TypeKind.ENUM and len(parents) > 0 and parents[-1].kind == clang.cindex.CursorKind.TYPEDEF_DECL:
includeargs = reduce(lambda acc, e: acc + e, [["-include", inc] for inc in includes], ) if includes else 
+ # create a dummy file if we get contents, because seems libclang is not happy with a name like "-"
+You can use ``-`` as the file name, in which case ``nsstringfromenumgen`` expects to receive the file contents from standard input. You can use this to feed a single enum definition ``nsstringfromenumgen``, instead of a whole source file. However, if you're using the recently added ``NS_ENUM`` and ``NS_OPTIONS`` macros, you'll need to use the ``--include`` flag to include ``NSObjCRuntime.h`` (or another header that includes it, such as ``Foundation.h``.)
If your code relies on a prefix header, you need to include it on the command line with the ``--include`` flag. You can specify more than one of them if necessary.
You can also instruct ``nsstringfromenumgen`` to treat your enums as options for a bitmask by including the ``--mask`` flag::