Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bump syntax_tree from 4.3.0 to 5.0.0#25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kddnewton merged 1 commit intomainfromdependabot/bundler/syntax_tree-5.0.0
Nov 9, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabotdependabotbot commented on behalf ofgithubNov 9, 2022

Bumpssyntax_tree from 4.3.0 to 5.0.0.

Changelog

Sourced fromsyntax_tree's changelog.

[5.0.0] - 2022-11-09

Added

  • Every node now implements the#copy(**) method, which provides a copy of the node with the given attributes replaced.
  • Every node now implements the#===(other) method, which checks if the given node matches the current node for all attributes except for comments and location.
  • There is a newSyntaxTree::Visitor::MutationVisitor and its convenience methodSyntaxTree.mutation which can be used to mutate a syntax tree. For details on how to use this visitor, check the README.

Changed

  • Nodes no longer have acomments: keyword on their initializers. By default, they initialize to an empty array. If you were previously passing comments into the initializer, you should now create the node first, then callnode.comments.concat to add your comments.
  • A lot of nodes have been folded into other nodes to make it easier to interact with the AST. This means that a lot of visit methods have been removed from the visitor and a lot of class definitions are no longer present. This also means that the nodes that received more function now have additional methods or fields to be able to differentiate them. Note that none of these changes have resulted in different formatting. The changes are listed below:
    • IfMod,UnlessMod,WhileMod,UntilMod have been folded intoIfNode,UnlessNode,WhileNode, andUntilNode. Each of the nodes now have amodifier? method to tell if it was originally in the modifier form. Consequently, thevisit_if_mod,visit_unless_mod,visit_while_mod, andvisit_until_mod methods have been removed from the visitor.
    • VarAlias is no longer a node, and theAlias node has been renamed. They have been folded into theAliasNode node. TheAliasNode node now has avar_alias? method to tell you if it is aliasing a global variable. Consequently, thevisit_var_alias method has been removed from the visitor interface. If you were previously using this method, you should now usevisit_alias instead.
    • Yield0 is no longer a node, and theYield node has been renamed. They has been folded into theYieldNode node. TheYieldNode node can now have itsarguments field benil. Consequently, thevisit_yield0 method has been removed from the visitor interface. If you were previously using this method, you should now usevisit_yield instead.
    • FCall is no longer a node, and theCall node has been renamed. They have been folded into theCallNode node. TheCallNode node can now have itsreceiver andoperator fields benil. Consequently, thevisit_fcall method has been removed from the visitor interface. If you were previously using this method, you should now usevisit_call instead.
    • Dot2 andDot3 are no longer nodes. Instead they have become a single newRangeNode node. This node looks the same asDot2 andDot3, except that it additionally has anoperator field that contains the operator that created the node. Consequently, thevisit_dot2 andvisit_dot3 methods have been removed from the visitor interface. If you were previously using these methods, you should now usevisit_range instead.
    • Def,DefEndless, andDefs have been folded into theDefNode node. TheDefNode node now has thetarget andoperator fields which originally came fromDefs which can both benil. It also now has anendless? method on it to tell if the original node was found in the endless form. Finally thebodystmt field can now either be aBodyStmt as it was or any other kind of node since that was the body of theDefEndless node. Thevisit_defs andvisit_def_endless methods on the visitor have therefore been removed.
    • DoBlock andBraceBlock have now been folded into aBlockNode node. TheBlockNode node now has akeywords? method on it that returns true if the block was constructed with thedo..end keywords. Thevisit_do_block andvisit_brace_block methods on the visitor have therefore been removed and replaced with thevisit_block method.
    • Return0 is no longer a node, and theReturn node has been renamed. They have been folded into theReturnNode node. TheReturnNode node can now have itsarguments field benil. Consequently, thevisit_return0 method has been removed from the visitor interface. If you were previously using this method, you should now usevisit_return instead.
  • TheArgsForward,Redo,Retry, andZSuper nodes no longer havevalue fields associated with them (which were always string literals corresponding to the keyword being used).
  • TheCommand andCommandCall nodes now hasblock attributes on them. These attributes are used in the place where you would previously have had aMethodAddBlock structure. Where before theMethodAddBlock would have the command and block as its two children, you now just have one command node with theblock attribute set to theBlock node.
  • Previously the formatting options were defined on an unfrozen hash calledSyntaxTree::Formatter::OPTIONS. It was globally mutable, which made it impossible to reference from within a Ractor. As such, it has now been replaced withSyntaxTree::Formatter::Options.new which creates a new options object instance that can be modified without impacting global state. As a part of this change, formatting can now be performed from within a non-main Ractor. In order to check if theplugin/single_quotes plugin has been loaded, check ifSyntaxTree::Formatter::SINGLE_QUOTES is defined. In order to check if theplugin/trailing_comma plugin has been loaded, check ifSyntaxTree::Formatter::TRAILING_COMMA is defined.
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting@dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [syntax_tree](https://github.com/kddnewton/syntax_tree) from 4.3.0 to 5.0.0.- [Release notes](https://github.com/kddnewton/syntax_tree/releases)- [Changelog](https://github.com/ruby-syntax-tree/syntax_tree/blob/main/CHANGELOG.md)- [Commits](ruby-syntax-tree/syntax_tree@v4.3.0...v5.0.0)---updated-dependencies:- dependency-name: syntax_tree  dependency-type: direct:production  update-type: version-update:semver-major...Signed-off-by: dependabot[bot] <support@github.com>
@dependabotdependabotbot added the dependenciesPull requests that update a dependency file labelNov 9, 2022
@kddnewtonkddnewton merged commit8be7052 intomainNov 9, 2022
@kddnewtonkddnewton deleted the dependabot/bundler/syntax_tree-5.0.0 branchNovember 9, 2022 19:15
@davidwessmandavidwessman mentioned this pull requestApr 23, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
dependenciesPull requests that update a dependency file
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@kddnewton

[8]ページ先頭

©2009-2025 Movatter.jp