Misc macro things (#10612)

* Misc cleanup in macro code

Generate error messages using `error` instead of `assert`.

Fixes #10574

* Fix crash with hasCustomPragma on quoted fields

Use the `$` operator instead of reaching for the `strVal` field directly
This commit is contained in:
LemonBoy 2019-02-09 18:22:07 +01:00 • committed by Andreas Rumpf
commit 1e88bf1def
2 changed files with 19 additions and 14 deletions

View file

@ -22,7 +22,7 @@ import custom_pragma
block: # A bit more advanced case
type
Subfield {.defaultValue: "catman".} = object
c* {.serializationKey: "cc".}: float
`c`* {.serializationKey: "cc".}: float
MySerializable = object
a {.serializationKey"asdf", defaultValue: 5.} : int