Skip to content

ternary not supported #7

@L2jLiga

Description

@L2jLiga

Hello, I've noticed that parser unable to work with ternary expression, could you fix this please?

input:

$variable=$true ?1:0

output:

(program [0, 0] - [0, 19]
  (statement_list [0, 0] - [0, 19]
    (pipeline [0, 0] - [0, 19]
      (assignment_expression [0, 0] - [0, 19]
        (left_assignment_expression [0, 0] - [0, 9]
          (logical_expression [0, 0] - [0, 9]
            (bitwise_expression [0, 0] - [0, 9]
              (comparison_expression [0, 0] - [0, 9]
                (additive_expression [0, 0] - [0, 9]
                  (multiplicative_expression [0, 0] - [0, 9]
                    (format_expression [0, 0] - [0, 9]
                      (range_expression [0, 0] - [0, 9]
                        (array_literal_expression [0, 0] - [0, 9]
                          (unary_expression [0, 0] - [0, 9]
                            (variable [0, 0] - [0, 9])))))))))))
        (assignement_operator [0, 9] - [0, 10])
        (ERROR [0, 10] - [0, 16]
          (variable [0, 10] - [0, 15])
          (ERROR [0, 15] - [0, 16]))
        value: (pipeline [0, 16] - [0, 19]
          (command [0, 16] - [0, 19]
            command_name: (command_name [0, 16] - [0, 19])))))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions