Releases: NomicFoundation/slang
v1.3.4
v1.3.3
Patch Changes
-
#1523
27f07a8Thanks @teofr! - Removeconstant,view, andpureattributes fromUnnamedFunctionDefinition, to disambiguate fromStateVariableDefinitionthat have afunctiontype. -
#1526
a52001dThanks @teofr! - Fixed associativity ofAssignmentExpressionfrom left to right. -
#1525
7f3ea6fThanks @teofr! - Add support for Solidity0.8.34. -
#1502
6963419Thanks @teofr! - Fixed the old style revert calls (revert("oops!")) to be parsed as aFunctionCallExpressionrather than aRevertStatement.
v1.3.2
Patch Changes
- #1495
e3f391cThanks @OmarTawfik! - Add support for Solidity0.8.32and0.8.33.
v1.3.1
v1.3.0
Minor Changes
-
#1396
d568decThanks @beta-ziliani! - Add a rewriter API, allowing the transformation of CSTs by extending theBaseRewritertype, overriding the appropriate methods (User Guide). -
#1440
4438fc8Thanks @OmarTawfik! - addTextIndexExtensions.zero()utility to create an index at offset zero, which is useful for creating cursors from child nodes where parent offset is not needed. -
#1390
6a0f598Thanks @OmarTawfik! - Add new TypeScript APIs for creating nodes and edges:NonterminalNode.create(kind: NonterminalKind, children: Edge[]): NonterminalNodeTerminalNode.create(kind: TerminalKind, text: string): TerminalNodecreateEdge(label: EdgeLabel, node: Node): EdgeEdge.createWithNonterminal(label: EdgeLabel, node: NonterminalNode): EdgeEdge.createWithTerminal(label: EdgeLabel, node: TerminalNode): Edge
Patch Changes
-
#1424
d54a35cThanks @ggiraldez! - Resolve identifiers in assembly blocks to locally imported symbols -
#1388
4607e6aThanks @beta-ziliani! - Fixed the pragma grammar and CST nodes:-
pragma abicoder <version>:- Only enabled starting Solidity
0.7.5. <version>is restricted to new keywords (v1andv2).
- Only enabled starting Solidity
-
pragma experimental <flag>:- Only enabled starting Solidity
0.4.16. <flag>is restricted to be a string, or new keywords representingABIEncoderV2andSMTChecker.
- Only enabled starting Solidity
-
-
#1431
a62c857Thanks @OmarTawfik! - fix CST query matches to return an empty array for unmatched named captures, instead ofundefined.
v1.2.1
Patch Changes
-
#1377
f3b51beThanks @ggiraldez! - Bind untyped tuple deconstruction elements as references, not declarations -
#1335
6c3ad5dThanks @ggiraldez! - Top-levelConstantDefinitions now bind to their type and resolve extension functions called on them -
#1338
18be0bcThanks @ggiraldez! - Make try/catch parameters and vars in for loop initialization available in Yul -
#1339
f16e4b5Thanks @ggiraldez! - Fixes to the binding rules in Solidity:- Make the
.lengthmember 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.senderis ofaddresstype (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
8e718ddThanks @ggiraldez! - Fixes to the binding rules in Solidity:- Values of the deprecated
bytetype have alengthmember until 0.8.0 - Bind a qualified identifier in the same contract, ie.
Foo.xin a method body ofFoo - Correctly bind external constants and built-ins in nested functions in assembly blocks
- Literal boolean values should bind to the
booltype to chain extension functions - Public state variables the generate getters should have members of external functions (such as
.selector) - Event types have a
selectormember
- Values of the deprecated
-
#1326
045179bThanks @ggiraldez! - Fixes to binding rules:- Update
TupleDeconstructionStatementso that their definiens is theTypedTupleMember/UntypedTupleMemberfor each variable declared. - Update
YulVariableDeclarationStatementso that their definiens is theYulIdentifierfor each variable declared.
- Update
-
#1350
0594fe8Thanks @ggiraldez! - Fixes to bindings rules in Solidity:- Allow binding of
usingdirectives inside interfaces in Solidity < 0.7.1 - Bind literal fixed arrays types
- Fix generating binding graph for built-ins: remove the
memorylocation 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
newexpressions - Bind output type of public getters when the state variable is a nested mapping or array
- A
usingdirective with theglobalmodifier 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 onenumtypes should bind only after Solidity 0.8.8 - Bound type for literal number expressions is
uint256by default; this allows correctly binding extension methods operating on literal values - The type
bytesis an array type and should bind thepush()andpop()methods - Contract or interface reference values implicitly inherit from the
addresstype 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
thisin function methods and work as anaddresstype
- Allow binding of
v1.2.0
Minor Changes
- #1330
56393d5Thanks @OmarTawfik! - add support for Solidity0.8.30
Patch Changes
-
#1314
743d6b0Thanks @mjoerussell! - Adding missing YUL built in functions:codesize()codecopy(f, t, s)
v1.1.0
Minor Changes
-
#1288
2090ab8Thanks @OmarTawfik! - support Solidity0.8.29and Custom Storage Layouts:ContractDefinitionnodes will no longer have an optionalInheritanceSpecifierchild directly, but will hold a list ofContractSpecifierchildrenContractSpecifiernodes have eitherInheritanceSpecifierorStorageLayoutSpecifierchildren
-
#1265
2312260Thanks @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
da1f863Thanks @ggiraldez! - Resolve arguments to inheritance specifiers and expressions in storage layout specifiers using the contract's parent scope.
v1.0.0
Major Changes
- #1279
6de3e41Thanks @OmarTawfik! - release Slang v1 🚀🚀🚀
v0.20.1
Patch Changes
- #1275
ed2cae9Thanks @OmarTawfik! - renameComparisonExpressiontoInequalityExpression