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

Spec for Extension Types proposal #259

Merged
merged 10 commits into from
Aug 2, 2024
Merged

Spec for Extension Types proposal #259

merged 10 commits into from
Aug 2, 2024

Conversation

ZverGuy
Copy link
Contributor

@ZverGuy ZverGuy commented Aug 2, 2024

fix issue #255

Summary by CodeRabbit

  • New Features
    • Introduced a comprehensive specification for extension types in the Vein Language, enhancing the ability to augment existing types with new functionality.
    • Defined two forms of extension declarations: explicit and implicit, detailing their syntax and usage.
    • Provided guidelines for implementing methods, properties, and events within extensions, improving code maintainability.

@ZverGuy ZverGuy requested a review from 0xF6 as a code owner August 2, 2024 16:18
@code-maid
Copy link
Member

code-maid commented Aug 2, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

Copy link
Contributor

coderabbitai bot commented Aug 2, 2024

Warning

Rate limit exceeded

@ZverGuy has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 31 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between d810e27 and 0f8cbf4.

Walkthrough

The new specification for extension types in the Vein Language enables developers to augment existing types with enhanced functionality. It delineates explicit and implicit extension declarations, offering comprehensive guidelines on syntax, member declarations, and parser implementation to boost code functionality and maintainability.

Changes

Files Change Summary
specs/extension_types.md Introduced specifications for extension types, defining explicit and implicit declarations, syntax rules, and implementation guidance for the Vein Language parser.

Poem

🐰 In code we hop, with extensions bright,
Enhancing types, what a lovely sight!
Explicit or implicit, choose your way,
New members dance, come join the play!
With every change, our code will sing,
In the realm of Vein, new joys we bring! 🎉


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ZverGuy
Copy link
Contributor Author

ZverGuy commented Aug 2, 2024

I have read the CLA Document and I hereby sign the CLA

code-maid added a commit that referenced this pull request Aug 2, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (2)
specs/extension_types.md (2)

34-87: Specify the language for fenced code blocks.

To improve readability and comply with Markdownlint rules, specify the language for fenced code blocks.

- ```
+ ```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

40-40: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

58-58: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

66-66: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

81-81: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`89-139`: **Specify the language for fenced code blocks.**

To improve readability and comply with Markdownlint rules, specify the language for fenced code blocks.

```diff
- ```
+ ```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

95-95: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

105-105: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

115-115: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

125-125: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

135-135: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**

<details>
<summary>Commits</summary>

Files that changed from the base of the PR and between d620496a8a704f293c024408d45dab6f3c56a6ff and 92552e9b859b5a0edf00155a98f93bc852af15b6.

</details>


<details>
<summary>Files selected for processing (1)</summary>

* specs/extension_types.md (1 hunks)

</details>










<details>
<summary>Additional context used</summary>

<details>
<summary>LanguageTool</summary><blockquote>

<details>
<summary>specs/extension_types.md</summary><blockquote>

[style] ~147-~147: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...it extensions (optional). - `extension` keyword to introduce the extension.  ### Extens...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

</blockquote></details>

</blockquote></details>
<details>
<summary>Markdownlint</summary><blockquote>

<details>
<summary>specs/extension_types.md</summary><blockquote>

40-40: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

58-58: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

66-66: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

81-81: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

95-95: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

105-105: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

115-115: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

125-125: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

135-135: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</blockquote></details>

</details>
<details>
<summary>Additional comments not posted (7)</summary><blockquote>

<details>
<summary>specs/extension_types.md (7)</summary><blockquote>

`3-6`: **LGTM!**

The introduction is clear and concise.

---

`7-10`: **LGTM!**

The explanation of extension declarations is clear and concise.

---

`11-15`: **LGTM!**

The explanation of explicit and implicit extensions is clear and concise.

---

`141-163`: **LGTM!**

The parsing procedures are clear and concise.

<details>
<summary>Tools</summary>

<details>
<summary>LanguageTool</summary><blockquote>

[style] ~147-~147: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...it extensions (optional). - `extension` keyword to introduce the extension.  ### Extens...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

</blockquote></details>

</details>

---

`165-180`: **LGTM!**

The example parsing implementation is clear and concise.

---

`182-201`: **LGTM!**

The example extension declarations are clear and concise.

---

`203-205`: **LGTM!**

The conclusion is clear and concise.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

specs/extension_types.md Outdated Show resolved Hide resolved
specs/extension_types.md Outdated Show resolved Hide resolved
specs/extension_types.md Outdated Show resolved Hide resolved
specs/extension_types.md Outdated Show resolved Hide resolved
specs/extension_types.md Outdated Show resolved Hide resolved
specs/extension_types.md Outdated Show resolved Hide resolved
specs/extension_types.md Outdated Show resolved Hide resolved
@0xF6 0xF6 requested a review from code-maid August 2, 2024 16:29
ZverGuy and others added 2 commits August 2, 2024 19:31
remove lang colorizing
fix shit

Co-authored-by: Yuuki Wesp <ls-micro@ya.ru>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (18)
specs/extension_types.md (18)

40-42: Specify the language for fenced code blocks.

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

40-40: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`58-60`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

58-58: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`66-75`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

66-66: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`81-87`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

81-81: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`95-99`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

95-95: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`105-109`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

105-105: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`115-119`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

115-115: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`125-129`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

125-125: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`135-139`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```ebnf

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

135-135: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`143-148`: **Reword sentences to avoid repetition.**

To improve readability and comply with LanguageTool suggestions, reword the sentences to avoid repetition.

```diff
-`explicit` keyword for explicit extensions (optional).
-`implicit` keyword for implicit extensions (optional).
-`extension` keyword to introduce the extension.
+Use the `explicit` keyword for explicit extensions (optional).
+Use the `implicit` keyword for implicit extensions (optional).
+Use the `extension` keyword to introduce the extension.
Tools
LanguageTool

[style] ~147-~147: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...it extensions (optional). - extension keyword to introduce the extension. ### Extens...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


171-171: Incorporate previous suggestions.

To improve readability and follow best practices, incorporate the previous suggestions.

-from modifiers in ExtensionModifiers.Token().Many()
+from modifiers in Modifier.Token().Many()

172-172: Incorporate previous suggestions.

To improve readability and follow best practices, incorporate the previous suggestions.

-from keyword in Parse.String("extension").Token()
+from keyword in KeyworkExpression("extension").Token()

174-174: Incorporate previous suggestions.

To improve readability and follow best practices, incorporate the previous suggestions.

-from typeParams in TypeParameterList.Token().Optional()
+from typeParams in GenericsDeclarationParser.Token().Optional()

175-175: Incorporate previous suggestions.

To improve readability and follow best practices, incorporate the previous suggestions.

-from forKeyword in Parse.String("for").Token().Optional()
+from forKeyword in KeyworkExpression("for").Token().Optional()

177-177: Incorporate previous suggestions.

To improve readability and follow best practices, incorporate the previous suggestions.

-from constraints in TypeParameterConstraintsClause.Token().Many().Optional()
+from constraints in GenericConstraintParser.Token().Many().Optional()

178-178: Incorporate previous suggestions.

To improve readability and follow best practices, incorporate the previous suggestions.

-from body in ExtensionBody.Token()
+from body in ClassMemberDeclaration.Token()

186-193: Specify the language for fenced code blocks.

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

-```
+```csharp

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

186-186: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`197-201`: **Specify the language for fenced code blocks.**

To improve readability and comply with markdownlint rules, specify the language for fenced code blocks.

```diff
-```
+```csharp

<details>
<summary>Tools</summary>

<details>
<summary>Markdownlint</summary><blockquote>

197-197: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**

<details>
<summary>Commits</summary>

Files that changed from the base of the PR and between 92552e9b859b5a0edf00155a98f93bc852af15b6 and d810e27f900c4c5954267d48d21f787a49d23f7a.

</details>


<details>
<summary>Files selected for processing (1)</summary>

* specs/extension_types.md (1 hunks)

</details>










<details>
<summary>Additional context used</summary>

<details>
<summary>LanguageTool</summary><blockquote>

<details>
<summary>specs/extension_types.md</summary><blockquote>

[style] ~147-~147: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...it extensions (optional). - `extension` keyword to introduce the extension.  ### Extens...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

</blockquote></details>

</blockquote></details>
<details>
<summary>Markdownlint</summary><blockquote>

<details>
<summary>specs/extension_types.md</summary><blockquote>

40-40: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

58-58: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

66-66: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

81-81: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

95-95: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

105-105: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

115-115: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

125-125: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

135-135: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

186-186: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

197-197: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</blockquote></details>

</details>
<details>
<summary>Additional comments not posted (4)</summary><blockquote>

<details>
<summary>specs/extension_types.md (4)</summary><blockquote>

`3-5`: **LGTM!**

The introduction section is clear and concise.

---

`7-9`: **LGTM!**

The extension declaration section is clear and concise.

---

`11-14`: **LGTM!**

The explicit vs implicit extensions section is clear and concise.

---

`203-205`: **LGTM!**

The conclusion section is clear and concise.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

ZverGuy and others added 7 commits August 2, 2024 19:35
fix example 3

Co-authored-by: Yuuki Wesp <ls-micro@ya.ru>
changes

Co-authored-by: Yuuki Wesp <ls-micro@ya.ru>
update spec

Co-authored-by: Yuuki Wesp <ls-micro@ya.ru>
apply

Co-authored-by: Yuuki Wesp <ls-micro@ya.ru>
Co-authored-by: Yuuki Wesp <ls-micro@ya.ru>
Co-authored-by: Yuuki Wesp <ls-micro@ya.ru>
@0xF6 0xF6 merged commit b064cca into vein-lang:master Aug 2, 2024
2 of 3 checks passed
@vein-lang vein-lang locked and limited conversation to collaborators Aug 2, 2024
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.

3 participants