Releases: NomicFoundation/slang
v1.2.1
Patch Changes
-
#1377
f3b51be
Thanks @ggiraldez! - Bind untyped tuple deconstruction elements as references, not declarations -
#1335
6c3ad5d
Thanks @ggiraldez! - Top-levelConstantDefinition
s now bind to their type and resolve extension functions called on them -
#1338
18be0bc
Thanks @ggiraldez! - Make try/catch parameters and vars in for loop initialization available in Yul -
#1339
f16e4b5
Thanks @ggiraldez! - Fixes to the binding rules in Solidity:- Make the
.length
member available in all static-size byte arrays - Allow assembly blocks (and nested Yul functions) to access inherited state variables
- Allow assembly blocks access to constructor/modifier/fallback parameters
msg.sender
is ofaddress
type (notpayable
) until 0.5.0- Top-level constants need to be visible from assembly blocks in files that import them
- Resolve named arguments when calling an extension function
- Imported symbols using deconstruction syntax can be bound in assembly blocks
- Make the
-
#1353
8e718dd
Thanks @ggiraldez! - Fixes to the binding rules in Solidity:- Values of the deprecated
byte
type have alength
member until 0.8.0 - Bind a qualified identifier in the same contract, ie.
Foo.x
in a method body ofFoo
- Correctly bind external constants and built-ins in nested functions in assembly blocks
- Literal boolean values should bind to the
bool
type to chain extension functions - Public state variables the generate getters should have members of external functions (such as
.selector
) - Event types have a
selector
member
- Values of the deprecated
-
#1326
045179b
Thanks @ggiraldez! - Fixes to binding rules:- Update
TupleDeconstructionStatement
so that their definiens is theTypedTupleMember
/UntypedTupleMember
for each variable declared. - Update
YulVariableDeclarationStatement
so that their definiens is theYulIdentifier
for each variable declared.
- Update
-
#1350
0594fe8
Thanks @ggiraldez! - Fixes to bindings rules in Solidity:- Allow binding of
using
directives inside interfaces in Solidity < 0.7.1 - Bind literal fixed arrays types
- Fix generating binding graph for built-ins: remove the
memory
location specifier from types so they bind properly - Fix return type of
value()
andgas()
legacy call options to allow chaining them - Bind legacy call options in the result of
new
expressions - Bind output type of public getters when the state variable is a nested mapping or array
- A
using
directive with theglobal
modifier should impact the source unit's lexical scope - Relax the Solidity version where the
transfer()
method works for non-payable addresses; this is a workaround for a Solidity quirk that makes it possible to doaddress(uint160(to)).transfer(amount)
even after 0.5.0 - Fix bound return types of
wrap()
andunwrap()
methods of a user value defined type - Resolve the type of
min()
andmax()
oftype()
expressions for integer types to the integer type given in the expression operand - Fix binding of fully qualified modifier invocations
- Fix #1321:
min()
andmax()
fortype()
expressions onenum
types should bind only after Solidity 0.8.8 - Bound type for literal number expressions is
uint256
by default; this allows correctly binding extension methods operating on literal values - The type
bytes
is an array type and should bind thepush()
andpop()
methods - Contract or interface reference values implicitly inherit from the
address
type on Solidity < 0.5.0 - Modifiers are allowed inside interfaces until Solidity 0.8.8 and thus should properly bind and be accessible from inheriting contracts
- Libraries before Solidity 0.5.0 allowed
this
in function methods and work as anaddress
type
- Allow binding of
v1.2.0
Minor Changes
- #1330
56393d5
Thanks @OmarTawfik! - add support for Solidity0.8.30
Patch Changes
-
#1314
743d6b0
Thanks @mjoerussell! - Adding missing YUL built in functions:codesize()
codecopy(f, t, s)
v1.1.0
Minor Changes
-
#1288
2090ab8
Thanks @OmarTawfik! - support Solidity0.8.29
and Custom Storage Layouts:ContractDefinition
nodes will no longer have an optionalInheritanceSpecifier
child directly, but will hold a list ofContractSpecifier
childrenContractSpecifier
nodes have eitherInheritanceSpecifier
orStorageLayoutSpecifier
children
-
#1265
2312260
Thanks @mjoerussell! - AddLanguageUtils::infer_language_versions(source_code) -> Version[]
API, which will analyze version pragmas inside a source file, and return a list of supported language versions that they allow. This can be used to select a valid language version to use with the rest of Slang APIs. Please see the Choosing a Solidity Version guide for more information.
Patch Changes
- #1291
da1f863
Thanks @ggiraldez! - Resolve arguments to inheritance specifiers and expressions in storage layout specifiers using the contract's parent scope.
v1.0.0
Major Changes
- #1279
6de3e41
Thanks @OmarTawfik! - release Slang v1 🚀🚀🚀
v0.20.1
Patch Changes
- #1275
ed2cae9
Thanks @OmarTawfik! - renameComparisonExpression
toInequalityExpression
v0.20.0
Minor Changes
-
#1203
a5c3b1a
Thanks @ggiraldez! - add separate contexts (ie. binding scopes) for Solidity and Yul built-ins -
#1257
9f5d8f0
Thanks @OmarTawfik! - exportassertUserFileLocation()
andassertBuiltInLocation()
utilities from thebindings
module -
#1243
99d182f
Thanks @ggiraldez! - adddefinition.references()
API to find all references that resolve to a definition. -
#1205
103b331
Thanks @mjoerussell! - MakeEdge::label
a required field instead of being optional. -
#1257
9f5d8f0
Thanks @OmarTawfik! - update user guides with new binding graph and compilation APIs -
#1257
9f5d8f0
Thanks @OmarTawfik! - exportassertNonterminalNode()
andassertTerminalNode()
utilities from thecst
module
Patch Changes
-
#1246
aea2dd0
Thanks @OmarTawfik! - unreservejump
andjumpi
yul keywords between0.6.0
and0.8.0
-
#1203
a5c3b1a
Thanks @ggiraldez! - enableaddress payable
from 0.5.0 and removetransfer
built-in from non-payableaddress
es -
#1246
aea2dd0
Thanks @OmarTawfik! - make sure assembly flags are only enabled starting from0.8.13
-
#1246
aea2dd0
Thanks @OmarTawfik! - enable yul'strue
andfalse
keywords starting from0.6.2
-
#1246
aea2dd0
Thanks @OmarTawfik! - make suresuper
andthis
keywords are unreserved before0.8.0
.
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