Empty value incorrectly parsed as a syntax error #13

Closed
opened 2024-09-10 15:28:01 +02:00 by pfaffe · 3 comments
pfaffe commented 2024-09-10 15:28:01 +02:00 (Migrated from github.com)
  --foo: ;
}

Is parsed as a syntax error, but this is a valid declaration. Should it be an empty-string ValueName?

```* { --foo: ; } ``` Is parsed as a syntax error, but this is a valid declaration. Should it be an empty-string ValueName?
marijnh commented 2024-09-10 15:34:56 +02:00 (Migrated from github.com)

Oh wow, I did not know that. We could make value optional in the rule for Declaration. Would that work for you?

Oh wow, I did not know that. We could make `value` optional in the rule for `Declaration`. Would that work for you?
pfaffe commented 2024-09-10 15:51:09 +02:00 (Migrated from github.com)

I could work with that. Is that easier than allowing ValueName to be empty?

I could work with that. Is that easier than allowing ValueName to be empty?
marijnh commented 2024-09-10 15:55:47 +02:00 (Migrated from github.com)

There's no real value name there, it's just a missing value entirely, so generating an empty node seems needlessly indirect.

Attached patch implements this.

There's no real value name there, it's just a missing value entirely, so generating an empty node seems needlessly indirect. Attached patch implements this.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/css#13
No description provided.