diff options
Diffstat (limited to 'alv')
| -rw-r--r-- | alv/type.moon | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/alv/type.moon b/alv/type.moon index 765cab2..2e392d8 100644 --- a/alv/type.moon +++ b/alv/type.moon @@ -39,6 +39,7 @@ class Type --- pretty-print a value of this type. -- @function pp -- @tparam any value + -- @tparam[opt] bool raw whether to print "raw" (strings without quotes) -- @treturn string --- check two values of this type for equality. @@ -75,7 +76,9 @@ class Type -- -- @type Primitive class Primitive extends Type - pp: (value) => + pp: (value, raw) => + return tostring value if raw + switch @name when 'str' string.format '%q', value |
