☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

parser

Table of contents

Description:

This key defines the parser type for argument parser configurations.

The value must be argument. This specifies that the parameter uses the argument parser, which parses a single argument value.

Appears in:
└── Snippet
    └── params
        └── *
            └── Argument Parser Configuration
                └── parser
Type:
"argument" Required
Examples:

In this example, we have configured an argument parser for a snippet parameter.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[param]]>>
    params:
      param:
        parser: argument
        options:
          model:
            editor_key: example_id
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[param]]>>",
      "params": {
        "param": {
          "parser": "argument",
          "options": {
            "model": {
              "editor_key": "example_id"
            }
          }
        }
      }
    }
  }
}
Open in a new tab