Releases: NomicFoundation/slang
v0.19.0
Minor Changes
-
#1156
3a82f06
Thanks @OmarTawfik! - addnode.descendants()
andcursor.descendants()
APIs to allow iterating over all descendants of the current node in pre-order traversal. -
#1156
3a82f06
Thanks @OmarTawfik! - fixnode.children()
andparseOutput.errors()
return types -
#1194
7a25d63
Thanks @OmarTawfik! - splitparser/Parser.supportedVersions()
into a newutils/LanguageFacts
API, withallVersions()
,earliestVersion()
, andlatestVersion()
methods. -
#1194
7a25d63
Thanks @OmarTawfik! - expose theBingingGraph
API to allow querying definitions/references between source files. -
#1156
3a82f06
Thanks @OmarTawfik! - addcursor.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! - addcursor.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! - splitParser.parse()
API intoparse_file_contents()
andparse_nonterminal()
. -
#1194
7a25d63
Thanks @OmarTawfik! - add aCompilationBuilder
API to incrementally load and resolve source files and their imports. -
#1223
3e85a14
Thanks @OmarTawfik! - renameQuery.parse()
toQuery.create()
, and provide exactTextRange
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! - addTerminalKindExtensions.is_identifier()
API to distinguish terminals like Solidity'sIdentifier
and Yul'sYulIdentifier
. -
#1187
6389361
Thanks @beta-ziliani! - ChangeParseOutput
andFile.tree
to return aNonTerminal
instead of aNode
.
Patch Changes
-
#1134
cfc62f2
Thanks @OmarTawfik! - removeYulPathComponent
and just useYulIdentifier
instead. -
#1138
44a706f
Thanks @OmarTawfik! - addThisKeyword
andSuperKeyword
to the grammar, instead of parsing them as identifiers. -
#1134
cfc62f2
Thanks @OmarTawfik! - unreserveAddressKeyword
, and let it be used forMemberAccessExpression
,StructMember
, etc... -
#1154
7b9b478
Thanks @beta-ziliani! - Adding support for deprecated keywordsjump
andjumpi
v0.18.3
Patch Changes
- #1130
a97b27d
Thanks @OmarTawfik! - fix a bug where CST nodes are invalidated after using AST types
v0.18.2
Patch Changes
-
#1126
e1d9748
Thanks @OmarTawfik! - fix wasm type exports for the npm package -
#1122
bbb5323
Thanks @OmarTawfik! - support Solidity0.8.28
release
v0.18.1
Patch Changes
- #1123
bdb0ef3
Thanks @OmarTawfik! - fix a minor issue with npm package ESM imports
v0.18.0
Minor Changes
-
#1120
25eef3e
Thanks @OmarTawfik! - migrate NAPI front-end to WASM and ESM -
#1120
25eef3e
Thanks @OmarTawfik! - addTerminalKindExtensions.is_valid()
API to distinguish correctly-parsed and erroneous nodes -
#1117
be7bb79
Thanks @OmarTawfik! - renameLanguage
API toParser
, in preparation for introducing a multi-file compilation API. -
#1116
c88f9b5
Thanks @OmarTawfik! - mergelanguage
,parse_error
,parse_output
namespaces into theparser
namespace. -
#1115
96df645
Thanks @OmarTawfik! - mergecursor
,kinds
,query
, andtext_index
namespaces into thecst
namespace. -
#1120
25eef3e
Thanks @OmarTawfik! - unify API methods onTerminalNode
andNonTerminalNode
, and add type assertions and guards to both types -
#1120
25eef3e
Thanks @OmarTawfik! - expose edges and edge labels on CST nodes viaNode.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! - addTerminalNode.id
andNonterminal.id
properties to get a numeric ID that can be used in indexing/comparison at runtime. -
#1120
25eef3e
Thanks @OmarTawfik! - addTerminalKindExtensions.is_trivia()
API to distinguish between trivia nodes and other contentful nodes
Patch Changes
-
#1096
15c437c
Thanks @OmarTawfik! - add support for Solidity0.8.27
. -
#1120
25eef3e
Thanks @OmarTawfik! - changeParser::new()
constructor toParser::create()
static method. -
#1097
e17af22
Thanks @OmarTawfik! - Fix the grammar of keywords (blobbasefee
,blobhash
,mcopy
,tload
,tstore
) added in0.8.24
, as they were actually reserved in0.8.25
.
v0.17.0
Minor Changes
- #1079
43b389e
Thanks @OmarTawfik! - Move the Rust CLI into a separateslang_solidity_cli
crate.
Patch Changes
- #1086
f749e53
Thanks @AntonyBlakey! - The grammar forVersionExpressionSet
has changed to more accurately model the allowed structure.
v0.16.0
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
-
#1015
369ee30
Thanks @OmarTawfik! - upgrade to rust1.79.0
. -
#1052
54c9067
Thanks @ggiraldez! - Tree Query Language: Compute row and column information for query parser errors. -
#1048
c408caa
Thanks @OmarTawfik! - support Yul multiple variables declaration -
#1047
2b32045
Thanks @OmarTawfik! - inlineMemberAccess
enum into the parentMemberAccessExpression
-
#1062
6b05496
Thanks @OmarTawfik! - fix stack assignments operator=:
. -
#1052
54c9067
Thanks @ggiraldez! - Tree Query Language: Improve reporting when an error occurs attempting to parse edge labels or node kinds. -
#1037
2a74f91
Thanks @OmarTawfik! - fixExponentiationExpression
associativity before0.8.0
v0.15.1
Patch Changes
- #1012
9ca51b4
Thanks @OmarTawfik! - exposeQueryMatch
to public API
v0.15.0
Minor Changes
-
#975
46b1dde
Thanks @OmarTawfik! - renameQueryResult
toQueryMatch
, and itsbindings
tocaptures
. -
#971
be943b7
Thanks @Xanewok! - RenameRuleKind
toNonterminalKind
,TokenKind
toTerminalKind
, andNodeLabel
toEdgeLabel
. -
#963
a5593f9
Thanks @Xanewok! - Introduce aDiagnostic
API for compiler errors, warnings etc.
Patch Changes
-
#996
cdc153d
Thanks @OmarTawfik! - add support for version0.8.26
. -
#983
ea31417
Thanks @ggiraldez! - Expose the language root non-terminal kind atLanguage.rootKind()
. -
#965
61b6b06
Thanks @OmarTawfik! - refactor CST building and querying utilities into a separatemetaslang_cst
crate. -
#997
84ad856
Thanks @OmarTawfik! - Support stack assignments in Yul before0.5.0
.