Skip to content

Releases: NomicFoundation/slang

v1.2.1

23 Jul 22:31
53b08ab
Compare
Choose a tag to compare

Patch Changes

  • #1377 f3b51be Thanks @ggiraldez! - Bind untyped tuple deconstruction elements as references, not declarations

  • #1335 6c3ad5d Thanks @ggiraldez! - Top-level ConstantDefinitions 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 of address type (not payable) 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
  • #1353 8e718dd Thanks @ggiraldez! - Fixes to the binding rules in Solidity:

    • Values of the deprecated byte type have a length member until 0.8.0
    • Bind a qualified identifier in the same contract, ie. Foo.x in a method body of Foo
    • 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
  • #1326 045179b Thanks @ggiraldez! - Fixes to binding rules:

    • Update TupleDeconstructionStatement so that their definiens is the TypedTupleMember/UntypedTupleMember for each variable declared.
    • Update YulVariableDeclarationStatement so that their definiens is the YulIdentifier for each variable declared.
  • #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() and gas() 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 the global 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 do address(uint160(to)).transfer(amount) even after 0.5.0
    • Fix bound return types of wrap() and unwrap() methods of a user value defined type
    • Resolve the type of min() and max() of type() expressions for integer types to the integer type given in the expression operand
    • Fix binding of fully qualified modifier invocations
    • Fix #1321: min() and max() for type() expressions on enum 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 the push() and pop() 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 an address type

v1.2.0

22 May 21:53
a9ecfc3
Compare
Choose a tag to compare

Minor Changes

Patch Changes

v1.1.0

10 Apr 18:48
38e8a4a
Compare
Choose a tag to compare

Minor Changes

  • #1288 2090ab8 Thanks @OmarTawfik! - support Solidity 0.8.29 and Custom Storage Layouts:

    • ContractDefinition nodes will no longer have an optional InheritanceSpecifier child directly, but will hold a list of ContractSpecifier children
    • ContractSpecifier nodes have either InheritanceSpecifier or StorageLayoutSpecifier children
  • #1265 2312260 Thanks @mjoerussell! - Add LanguageUtils::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

17 Mar 16:06
e42f7f4
Compare
Choose a tag to compare

Major Changes

v0.20.1

11 Mar 19:23
4386836
Compare
Choose a tag to compare

Patch Changes

v0.20.0

10 Mar 11:23
a173a6c
Compare
Choose a tag to compare

Minor Changes

Patch Changes

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