- Description:
This key defines a parser configuration that parses an exact literal value. Mainly useful when configuring a snippet template.
- Appears in:
└── Snippet └── params └── * └── Literal Parser Configuration- Type:
Object- Properties:
This key defines configuration options for literal parser configurations.
The value is an object that can contain
literalandformatproperties. These options control what literal string value must be matched.Show examplesHide examples
In this example, we have configured literal parser options with a literal value.
Copied to clipboard_snippets: example: snippet: <<example [[literal_param]]>> params: literal_param: parser: literal options: literal: specific-value{ "_snippets": { "example": { "snippet": "<<example [[literal_param]]>>", "params": { "literal_param": { "parser": "literal", "options": { "literal": "specific-value" } } } } } }This key defines the parser type for literal parser configurations.
The value must be
literal. This specifies that the parameter uses the literal parser, which matches a specific literal string value.Show examplesHide examples
In this example, we have configured a literal parser for a snippet parameter.
Copied to clipboard_snippets: example: snippet: <<example [[literal_param]]>> params: literal_param: parser: literal options: literal: specific-value{ "_snippets": { "example": { "snippet": "<<example [[literal_param]]>>", "params": { "literal_param": { "parser": "literal", "options": { "literal": "specific-value" } } } } } }- Examples: