Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

New Grammar #50

Closed
wants to merge 6 commits into from
Closed

New Grammar #50

wants to merge 6 commits into from

Conversation

ntrupin
Copy link
Owner

@ntrupin ntrupin commented Nov 18, 2019

Description

Rewrote the compile to use a new, more intuitive grammar.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@ntrupin
Copy link
Owner Author

ntrupin commented Nov 18, 2019

I'm leaving this pull request open for a bit to promote discussion on the new format.

@Yamboy1
Copy link
Contributor

Yamboy1 commented Nov 18, 2019

Just my opinion, I'm not a big fan of using a slash as a line terminator. I feel like a \n should be good enough there. Also with the div, I would prefer syntax such as

div:
    p > Element here

using whitespace and indents to show where the div starts and stops. Also, note the colon, so you can see where the nested element starts.

@ntrupin
Copy link
Owner Author

ntrupin commented Nov 18, 2019

I think I’ll work on implementing the colon, but I’m not sure about removing the line terminator. I think it’s important to have a symbol to indicate the end of a tag, and HTML does already use / in the closing tag, so I feel like it fits.

@Yamboy1
Copy link
Contributor

Yamboy1 commented Nov 19, 2019

I think it’s important to have a symbol to indicate the end of a tag,

Considering that you say in the readme that only a single tag is allowed on each line, it would make more sense that the newline becomes the terminator.

My only other thing is that the / is a weird character to use at the end of the line/tag, it feels like it should continue the line on (like it does in javascript strings)

@ntrupin ntrupin closed this Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants