-
Notifications
You must be signed in to change notification settings - Fork 19
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
update remaining public API and user docs terminology #975
update remaining public API and user docs terminology #975
Conversation
🦋 Changeset detectedLatest commit: 8642e72 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking another look at that! I've missed few cases, sorry about that.
I'm happy to fix obvious mistakes like go_to
for the cursor, edge labels etc. but I deliberately didn't go with lexer-related changes before, because the lexer technically shouldn't be concerned with the tree but rather with lexemes/tokens/symbols/what have you rather than terminals (which imply there are non-terminals). Suddenly all of our code is about terminality, which I think makes it harder to reason about and to navigate the codebase 😞
/// Serialize the token node to JSON. | ||
/// Serialize the node to JSON. | ||
/// | ||
/// This method is intended for debugging purposes and may not be stable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We agreed to remove this IIUC, so I think we should rather drop this from the other function (my mistake) rather than add it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
@@ -18,7 +18,7 @@ The Solidity programming language has evolved quite a bit since its inception. S | |||
|
|||
While it's good for a programming language to evolve and better serve the needs of its users, not being able to easily upgrade or re-deploy existing contracts poses a unique challenge. Developer tooling must be able to understand and consume older contracts that are still being used on the blockchain, written in older versions of Solidity. | |||
|
|||
Because of that, Slang must be able to reason about different versions of Solidity; how the language grammar, name binding rules, and semantics have changed [across different versions](../solidity-specification/supported-versions.md). One of our goals is to document differences as part of our [Solidity Specification](../solidity-specification/index.md). | |||
Because of that, Slang must be able to reason about different versions of Solidity; how the language grammar, name binding non-terminals, and semantics have changed [across different versions](../solidity-specification/supported-versions.md). One of our goals is to document differences as part of our [Solidity Specification](../solidity-specification/index.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about rules in general rather than syntax non-terminals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I missed this.
@@ -1,6 +1,6 @@ | |||
# Using the Parser | |||
|
|||
Using the API directly provides us with a more fine-grained control over the parsing process. It allows us to parse not just the input as a top-level source unit, but also individual rules like contracts, various definitions, and even expressions. | |||
Using the API directly provides us with a more fine-grained control over the parsing process. It allows us to parse not just the input as a top-level source unit, but also individual non-terminals like contracts, various definitions, and even expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably "constructs" would flow better here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Will update.
Following up on the changes started in NomicFoundation#971, updating the changeset, code references in the public API, comments, and some user docs.
38b3c2f
to
8642e72
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @nomicfoundation/slang@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-darwin-arm64@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-darwin-x64@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-linux-arm64-gnu@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-linux-arm64-musl@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-linux-x64-gnu@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-linux-x64-musl@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-win32-arm64-msvc@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-win32-ia32-msvc@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. ## @nomicfoundation/slang-win32-x64-msvc@0.15.0 ### Minor Changes - [#975](#975) [`46b1dde`](46b1dde) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - rename `QueryResult` to `QueryMatch`, and its `bindings` to `captures`. - [#971](#971) [`be943b7`](be943b7) Thanks [@Xanewok](https://github.com/Xanewok)! - Rename `RuleKind` to `NonterminalKind`, `TokenKind` to `TerminalKind`, and `NodeLabel` to `EdgeLabel`. - [#963](#963) [`a5593f9`](a5593f9) Thanks [@Xanewok](https://github.com/Xanewok)! - Introduce a `Diagnostic` API for compiler errors, warnings etc. ### Patch Changes - [#996](#996) [`cdc153d`](cdc153d) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - add support for version `0.8.26`. - [#983](#983) [`ea31417`](ea31417) Thanks [@ggiraldez](https://github.com/ggiraldez)! - Expose the language root non-terminal kind at `Language.rootKind()`. - [#965](#965) [`61b6b06`](61b6b06) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - refactor CST building and querying utilities into a separate `metaslang_cst` crate. - [#997](#997) [`84ad856`](84ad856) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - Support stack assignments in Yul before `0.5.0`. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Following up on changes in #971 and #918.