Skip to content

Usage of & in the description of the command enum values gives compile error #59

@kdeme

Description

@kdeme

Compile error:

test_conf.nim(7, 20) Error: Invalid node kind nnkInfix for macros.`$`

Reproduce snippet:

import
  confutils

type
  ExporterCmd* = enum
    exportCommand =
      "This multi " & # This fails
      "line fails"
    printCommand =
      """Multi lines with these
triple quoted strings does work"""

  ExporterConf* = object
    case cmd* {.
      command
      defaultValue: exportCommand .}: ExporterCmd
    of exportCommand:
      discard
    of printCommand:
      discard

when isMainModule:
  let config = ExporterConf.load()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions