Allow unquoted object field names #10

Open
opened 2 years ago by p · 0 comments
p commented 2 years ago
Owner

Just like in jq:

If the keys are "identifier-like", then the quotes can be left off

This is hugely more convenient to write. The highlighter already contains a lot of the necessary parsing code, it just needs to learn to recognize bare words ([a-zA-Z_]*), which we'll simply wrap in strings before passing the whole chunk to Jansson like we do now.

Of course, the shell could make use of way more extensions but:

  1. C is the wrong language entirely to build anything of such complexity just for fun, and
  2. fuck terminal UI in general.
Just like in `jq`: > If the keys are "identifier-like", then the quotes can be left off This is hugely more convenient to write. The highlighter already contains a lot of the necessary parsing code, it just needs to learn to recognize bare words ([a-zA-Z\_]\*), which we'll simply wrap in strings before passing the whole chunk to Jansson like we do now. Of course, the shell could make use of way more extensions but: 1. C is the wrong language entirely to build anything of such complexity just for fun, and 2. fuck terminal UI in general.
p added this to the v1.3.0 milestone 2 years ago
p self-assigned this 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.