Skip to content

Releases: NomicFoundation/slang

v0.19.0

24 Jan 14:07
be199cc
Compare
Choose a tag to compare

Minor Changes

  • #1156 3a82f06 Thanks @OmarTawfik! - add node.descendants() and cursor.descendants() APIs to allow iterating over all descendants of the current node in pre-order traversal.

  • #1156 3a82f06 Thanks @OmarTawfik! - fix node.children() and parseOutput.errors() return types

  • #1194 7a25d63 Thanks @OmarTawfik! - split parser/Parser.supportedVersions() into a new utils/LanguageFacts API, with allVersions(), earliestVersion(), and latestVersion() methods.

  • #1194 7a25d63 Thanks @OmarTawfik! - expose the BingingGraph API to allow querying definitions/references between source files.

  • #1156 3a82f06 Thanks @OmarTawfik! - add cursor.ancestors() API to allow iterating over all ancestors of the current node, starting with the immediate parent, and moving upwards, ending with the root node.

  • #1156 3a82f06 Thanks @OmarTawfik! - add cursor.remainingNodes() API to allow iterating over all the remaining nodes in the current tree, moving in pre-order traversal, until the tree is completed.

  • #1223 3e85a14 Thanks @OmarTawfik! - split Parser.parse() API into parse_file_contents() and parse_nonterminal().

  • #1194 7a25d63 Thanks @OmarTawfik! - add a CompilationBuilder API to incrementally load and resolve source files and their imports.

  • #1223 3e85a14 Thanks @OmarTawfik! - rename Query.parse() to Query.create(), and provide exact TextRange for any errors it returns.

  • #1172 6102886 Thanks @beta-ziliani! - Improved error recovery, where leading trivia are always parsed and included before an erroneous terminal.

  • #1223 3e85a14 Thanks @OmarTawfik! - add TerminalKindExtensions.is_identifier() API to distinguish terminals like Solidity's Identifier and Yul's YulIdentifier.

  • #1187 6389361 Thanks @beta-ziliani! - Change ParseOutput and File.tree to return a NonTerminal instead of a Node.

Patch Changes

v0.18.3

23 Oct 14:08
14edad7
Compare
Choose a tag to compare

Patch Changes

v0.18.2

15 Oct 20:05
06c9a3c
Compare
Choose a tag to compare

Patch Changes

v0.18.1

11 Oct 21:00
338c35a
Compare
Choose a tag to compare

Patch Changes

v0.18.0

09 Oct 01:45
81a8f61
Compare
Choose a tag to compare

Minor Changes

  • #1120 25eef3e Thanks @OmarTawfik! - migrate NAPI front-end to WASM and ESM

  • #1120 25eef3e Thanks @OmarTawfik! - add TerminalKindExtensions.is_valid() API to distinguish correctly-parsed and erroneous nodes

  • #1117 be7bb79 Thanks @OmarTawfik! - rename Language API to Parser, in preparation for introducing a multi-file compilation API.

  • #1116 c88f9b5 Thanks @OmarTawfik! - merge language, parse_error, parse_output namespaces into the parser namespace.

  • #1115 96df645 Thanks @OmarTawfik! - merge cursor, kinds, query, and text_index namespaces into the cst namespace.

  • #1120 25eef3e Thanks @OmarTawfik! - unify API methods on TerminalNode and NonTerminalNode, and add type assertions and guards to both types

  • #1120 25eef3e Thanks @OmarTawfik! - expose edges and edge labels on CST nodes via Node.children() method. This allows distinguishing between children of the same node based on their label/role in the parent, even if they have the same kind.

  • #1120 25eef3e Thanks @OmarTawfik! - add TerminalNode.id and Nonterminal.id properties to get a numeric ID that can be used in indexing/comparison at runtime.

  • #1120 25eef3e Thanks @OmarTawfik! - add TerminalKindExtensions.is_trivia() API to distinguish between trivia nodes and other contentful nodes

Patch Changes

v0.17.0

28 Aug 06:16
32a2525
Compare
Choose a tag to compare

Minor Changes

Patch Changes

  • #1086 f749e53 Thanks @AntonyBlakey! - The grammar for VersionExpressionSet has changed to more accurately model the allowed structure.

v0.16.0

07 Aug 12:39
cb36a4b
Compare
Choose a tag to compare

Minor Changes

  • #1030 7e467ce Thanks @ggiraldez! - Tree Query Language: queries now ignore trivia nodes.

  • #1030 7e467ce Thanks @ggiraldez! - Tree Query Language: remove the ellipsis query ... operator making it implicit, add an adjacency operator ..

Patch Changes

v0.15.1

16 Jun 20:36
fcc1698
Compare
Choose a tag to compare

Patch Changes

v0.15.0

12 Jun 12:29
43f22df
Compare
Choose a tag to compare

Minor Changes

  • #975 46b1dde Thanks @OmarTawfik! - rename QueryResult to QueryMatch, and its bindings to captures.

  • #971 be943b7 Thanks @Xanewok! - Rename RuleKind to NonterminalKind, TokenKind to TerminalKind, and NodeLabel to EdgeLabel.

  • #963 a5593f9 Thanks @Xanewok! - Introduce a Diagnostic API for compiler errors, warnings etc.

Patch Changes

v0.14.2

25 Apr 15:23
eec20db
Compare
Choose a tag to compare

Patch Changes

  • #948 ce88cb7 Thanks @Xanewok! - Restrict the grammar to correctly only allow an identifier in Yul variable declaration

  • #945 e8f80d8 Thanks @Xanewok! - Support .address built-in access in Yul paths