fluent icon indicating copy to clipboard operation
fluent copied to clipboard

Semantic Comments rev 1

Open zbraniecki opened this issue 7 years ago • 3 comments

Hi,

I'm starting a new issue to unify the work toward semantic comments. The first revision will mainly follow #139 and #140, but I'd like to design it to be ready for future extensions.

I wrote a very basic tooling parser which I fully expect to be rewritten, but I hope that the AST and tests will allow us to discuss the exact behavior and feature set that we want out of it.

Here's the branch: https://github.com/zbraniecki/fluent.js/tree/sem-comments-1

I also attempted to write some EBNF, but again, I more see it as a step toward unifying out shared agreement on how the semantic comments should work and expect it to require a full rewrite.

The ebnf is here: https://github.com/zbraniecki/fluent/blob/semantic-comments/spec/comments.ebnf

@stas - can you take a look at the AST, tests and EBNF? And can you help me set the scaffolding for the reference parser please? :)

zbraniecki avatar Oct 16 '18 05:10 zbraniecki

General comments:

We commonly read the grammars eagerly, so if a production is Text | Foo, you'll never get to Foo.

I think we would say "Paramater has a Variable", not "Variable is a Parameter". I don't think that Parameter has a name?

Should semantic comments be multi-line? Or is single-line all we want?

Not really exhaustive, just trying to keep the ball rolling (and pretend that I read all the things.)

Pike avatar Oct 18 '18 14:10 Pike

@stas - can you take a look at the AST, tests and EBNF? And can you help me set the scaffolding for the reference parser please? :)

I'll try to get to this early next week.

(PS. it's @stasm 👋.)

stasm avatar Oct 18 '18 14:10 stasm

Thanks for your patience, @zbraniecki. I have an idea on how to lay out the directories in the repos to make room for semantic comments. It involves a few file renames. We currently have a number of PRs open with the 0.8 changes and I'd prefer to avoid conflicts. Let's wait for them to land (which I hope happens this week for most of them) and then I'll be happy to help here.

stasm avatar Nov 06 '18 08:11 stasm