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

Make quotes part of grammar #22

Open
Infernio opened this issue Feb 28, 2022 · 0 comments
Open

Make quotes part of grammar #22

Infernio opened this issue Feb 28, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Infernio
Copy link
Member

Infernio commented Feb 28, 2022

Replaces #3. I want Zoia to be intuitive, and quotes are simply a lot more intuitive than a command for something as important as dialogue:

\s[Quick,] Anna said, \s[they need our help!]

vs.

"Quick," Anna said, "they need our help!"

We can still deliver all of the advantages of a command this way too (fancy quotes, ensuring it's closed, etc.).

Probably best to let dialogue span multiple lines so that long dialogue can be broken up to make it more readable - something like this:

// lineElementND disallows directly nested dialogue
dialogue: '"' lineElementND+ '"';
dialogueML: '"' lineElementND (Newline | lineElementND)* '"';

Consider what to do to prevent nesting dialogue inside marked up text, commands, etc. - verify after syntax checking?

@Infernio Infernio changed the title Make quotes prt of grammar Make quotes part of grammar Feb 28, 2022
@Infernio Infernio added the enhancement New feature or request label Feb 28, 2022
@Infernio Infernio added this to the v0.1.0 milestone Feb 28, 2022
@Infernio Infernio modified the milestones: v0.1.0, v0.2.0 Mar 9, 2022
Infernio added a commit that referenced this issue Feb 7, 2023
This gives a huge usability improvement, because now you can write e.g.

 "@A!", @C shouted as she ran towards her friend.

and it would get parsed properly:

 "@A|!", @C| shouted as she ran towards her friend.

Before this change, you would have had to add the bar terminator to @A
to get this to work, otherwise it would have been parsed as:

 "@A!",| @C| shouted as she ran towards her friend.

Note that that would have changed slightly as soon as #22 is done, to
something like this:

 "@A!|", @C| shouted as she ran towards her friend.

But that also still needs a terminator to be correct. With how often
punctuation occurs after an alias (e.g. a character's name), that isn't
great. This way we only lose the ability to have aliases with
punctuation in them, which doesn't strike me as a problem. I did keep
numbers in because I can see those being useful (@A1, etc.).

Closes #39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant