Skip to content

Parser throws error on [ #1024

@ThomasNieto

Description

@ThomasNieto

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Summary

If the property value contains a [ the parser thinks its the beginning of a function.

Steps to reproduce

$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Install Pester
  type: AnyPackageDsc/Package
  properties:
    Name: Pester
    Version: '[5.0,6.0)'
    Provider: AnyPackage.PSResourceGet\PSResourceGet
    Source: PSGallery
    Ensure: Present

Expected behavior

Parses string literal

Actual behavior

ERROR Parser: Unable to parse statement root: [5.0,6.0)

Error details

ERROR Parser: Unable to parse statement root: [5.0,6.0)

Environment data

7.6-preview4

Version

3.2-preview3

Visuals

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions