This key defines a parser configuration that parses a repeating set of exact literal values.
Appears in
└── Snippet
└── params
└── *
└── Repeating Literal Parser ConfigType
Object
Properties
This key defines configuration options for repeating literal parser configurations.
The value is an object that can contain literal, default, minimum, and editor_key properties. These options control what literal string is matched and how many times it can appear.
Appears in: Repeating Literal Parser Config.
Show examplesHide examples
In this example, we have configured repeating literal parser options with a literal value and default count.
_snippets:
example:
snippet: <<example [[literal_param]]>>
params:
literal_param:
parser: repeating_literal
options:
literal: separator
default: 1{
"_snippets": {
"example": {
"snippet": "<<example [[literal_param]]>>",
"params": {
"literal_param": {
"parser": "repeating_literal",
"options": {
"literal": "separator",
"default": 1
}
}
}
}
}
}This key defines the parser type for repeating literal parser configurations.
The value must be repeating_literal. This specifies that the parameter uses the repeating literal parser, which matches a literal string that can appear multiple times.
Appears in: Repeating Literal Parser Config.
Show examplesHide examples
In this example, we have configured a repeating literal parser for a snippet parameter.
_snippets:
example:
snippet: <<example [[literal_param]]>>
params:
literal_param:
parser: repeating_literal
options:
literal: separator
default: 1{
"_snippets": {
"example": {
"snippet": "<<example [[literal_param]]>>",
"params": {
"literal_param": {
"parser": "repeating_literal",
"options": {
"literal": "separator",
"default": 1
}
}
}
}
}
}