Skip to content

Latest commit

 

History

History
649 lines (345 loc) · 61.5 KB

File metadata and controls

649 lines (345 loc) · 61.5 KB

changelog

1.3.4

Patch Changes

  • #1533 afc9f87 Thanks @OmarTawfik! - Fixed a panic during constructing binding graphs, when the input has incomplete IdentifierPath expressions.

1.3.3

Patch Changes

  • #1523 27f07a8 Thanks @teofr! - Remove constant, view, and pure attributes from UnnamedFunctionDefinition, to disambiguate from StateVariableDefinition that have a function type.

  • #1526 a52001d Thanks @teofr! - Fixed associativity of AssignmentExpression from left to right.

  • #1525 7f3ea6f Thanks @teofr! - Add support for Solidity 0.8.34.

  • #1502 6963419 Thanks @teofr! - Fixed the old style revert calls (revert("oops!")) to be parsed as a FunctionCallExpression rather than a RevertStatement.

1.3.2

Patch Changes

1.3.1

Patch Changes

1.3.0

Minor Changes

  • #1396 d568dec Thanks @beta-ziliani! - Add a rewriter API, allowing the transformation of CSTs by extending the BaseRewriter type, overriding the appropriate methods (User Guide).

  • #1440 4438fc8 Thanks @OmarTawfik! - add TextIndexExtensions.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 6a0f598 Thanks @OmarTawfik! - Add new TypeScript APIs for creating nodes and edges:

    • NonterminalNode.create(kind: NonterminalKind, children: Edge[]): NonterminalNode
    • TerminalNode.create(kind: TerminalKind, text: string): TerminalNode
    • createEdge(label: EdgeLabel, node: Node): Edge
    • Edge.createWithNonterminal(label: EdgeLabel, node: NonterminalNode): Edge
    • Edge.createWithTerminal(label: EdgeLabel, node: TerminalNode): Edge

Patch Changes

  • #1424 d54a35c Thanks @ggiraldez! - Resolve identifiers in assembly blocks to locally imported symbols

  • #1388 4607e6a Thanks @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 (v1 and v2).
    • pragma experimental <flag>:
      • Only enabled starting Solidity 0.4.16.
      • <flag> is restricted to be a string, or new keywords representing ABIEncoderV2 and SMTChecker.
  • #1431 a62c857 Thanks @OmarTawfik! - fix CST query matches to return an empty array for unmatched named captures, instead of undefined.

1.2.1

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

1.2.0

Minor Changes

Patch Changes

1.1.0

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.

1.0.0

Major Changes

0.20.1

Patch Changes

0.20.0

Minor Changes

Patch Changes

0.19.0

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

0.18.3

Patch Changes

0.18.2

Patch Changes

0.18.1

Patch Changes

0.18.0

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

0.17.0

Minor Changes

Patch Changes

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

0.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

0.15.1

Patch Changes

0.15.0

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

0.14.2

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

0.14.1

Patch Changes

0.14.0

Minor Changes

Patch Changes

0.13.1

Patch Changes

0.13.0

Minor Changes

Patch Changes

0.12.0

Minor Changes

Patch Changes

0.11.0

Minor Changes

  • #625 7bb650b Thanks @Xanewok! - The CST Cursor now implements the Iterator trait as part of the Rust API

  • #647 b1dced3 Thanks @OmarTawfik! - Require specifying an initial offset when creating a CST cursor.

Patch Changes

0.10.1

Patch Changes

0.10.0

Minor Changes

Patch Changes

0.9.0

Minor Changes

Patch Changes

0.8.0

Minor Changes

  • #513 7e01250 Thanks @AntonyBlakey! - Typescript API now has TextIndex and TextRange types that are returned from the appropriate methods rather than tuples.

Patch Changes

0.7.0

Minor Changes

0.6.0

Minor Changes

Patch Changes

0.5.0

Minor Changes

0.4.0

Minor Changes

0.3.0

Minor Changes

0.2.1

Patch Changes

0.2.0

Minor Changes

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes