Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Formal Syntax Specification #29

Closed
wants to merge 21 commits into from
Closed

[WIP] Formal Syntax Specification #29

wants to merge 21 commits into from

Conversation

mrossinek
Copy link
Member

Rewrites the rather informal NFF spec (https://github.com/nvim-neorg/neorg/blob/main/docs/NFF-0.1-spec.md) to become a lot more formal to provide a ground-truth for parser implementations.

Copy link
Member Author

@mrossinek mrossinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vhyrro Just marking some open questions for you to review 😇

Comment on lines +430 to +431
- | | TODO: currently states in the docs that it must occur in pairs but this is not enforced by
the TS parser. I.e. the following is valid: ex:_ample_
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wdyt about this? Do we want to enforce the link modifier to occur in pairs? I lean on the side of not enforcing that because it would mean typing unnecessary chars and as things stand right now everything in this regard works just fine 👍

A {> character} is considered to be *punctuation* if it is any of the following:
- a standard ASCII punctuation character: |`!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~`|
- any punctuation character specific to the current locale
+TODO(Vhyrro): check if this is what we really want. Currently taken from std::iswpunct docs+
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking this as an open question

- `$`: {# Definitions} (range-able)
- `^`: {# Footnotes} (range-able)
- `=`: {# Insertions} (range-able)
- | | `?`: {# Multiple Choice Questions} +TODO: decide whether or not to make these range-able+
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure on this one. The ? detached modifier will be a bit special already because it will have restricted contents.
Since we now have the \ ... --- syntax for allowing e.g. code blocks within detached modifier content this could be used to insert more information into the question title. Thus, I don't think range-ability makes sense here but I wanted to discuss this before fixing this.

@mrossinek
Copy link
Member Author

Superseded by #35

@mrossinek mrossinek closed this Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants