[ruby/prism] Fix rebase templates
https://github.com/ruby/prism/commit/31b8c6142f
This commit is contained in:
parent
d266b71467
commit
5141643a27
@ -526,7 +526,8 @@ module Prism
|
|||||||
erb = read_template(template)
|
erb = read_template(template)
|
||||||
extension = File.extname(filepath.gsub(".erb", ""))
|
extension = File.extname(filepath.gsub(".erb", ""))
|
||||||
|
|
||||||
heading = case extension
|
heading =
|
||||||
|
case extension
|
||||||
when ".rb"
|
when ".rb"
|
||||||
<<~HEADING
|
<<~HEADING
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
@ -537,7 +538,6 @@ module Prism
|
|||||||
if you are looking to modify the template
|
if you are looking to modify the template
|
||||||
=end
|
=end
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
HEADING
|
HEADING
|
||||||
when ".rbs"
|
when ".rbs"
|
||||||
<<~HEADING
|
<<~HEADING
|
||||||
@ -568,18 +568,8 @@ module Prism
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
HEADING
|
HEADING
|
||||||
=======
|
|
||||||
{
|
|
||||||
errors: config.fetch("errors").map { |name| Error.new(name) },
|
|
||||||
warnings: config.fetch("warnings").map { |name| Warning.new(name) },
|
|
||||||
nodes: config.fetch("nodes").map { |node| NodeType.new(node) }.sort_by(&:name),
|
|
||||||
tokens: config.fetch("tokens").map { |token| Token.new(token) },
|
|
||||||
flags: config.fetch("flags").map { |flags| Flags.new(flags) }
|
|
||||||
}
|
|
||||||
>>>>>>> 35d292f929 (Expose types on diagnostics)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
write_to ||= File.expand_path("../#{name}", __dir__)
|
write_to ||= File.expand_path("../#{name}", __dir__)
|
||||||
contents = heading + erb.result_with_hash(locals)
|
contents = heading + erb.result_with_hash(locals)
|
||||||
|
|
||||||
@ -615,6 +605,8 @@ module Prism
|
|||||||
config = YAML.load_file(File.expand_path("../config.yml", __dir__))
|
config = YAML.load_file(File.expand_path("../config.yml", __dir__))
|
||||||
|
|
||||||
{
|
{
|
||||||
|
errors: config.fetch("errors").map { |name| Error.new(name) },
|
||||||
|
warnings: config.fetch("warnings").map { |name| Warning.new(name) },
|
||||||
nodes: config.fetch("nodes").map { |node| NodeType.new(node) }.sort_by(&:name),
|
nodes: config.fetch("nodes").map { |node| NodeType.new(node) }.sort_by(&:name),
|
||||||
tokens: config.fetch("tokens").map { |token| Token.new(token) },
|
tokens: config.fetch("tokens").map { |token| Token.new(token) },
|
||||||
flags: config.fetch("flags").map { |flags| Flags.new(flags) }
|
flags: config.fetch("flags").map { |flags| Flags.new(flags) }
|
||||||
@ -623,38 +615,6 @@ module Prism
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
TEMPLATES = [
|
|
||||||
"ext/prism/api_node.c",
|
|
||||||
"include/prism/ast.h",
|
|
||||||
"javascript/src/deserialize.js",
|
|
||||||
"javascript/src/nodes.js",
|
|
||||||
"javascript/src/visitor.js",
|
|
||||||
"java/org/prism/Loader.java",
|
|
||||||
"java/org/prism/Nodes.java",
|
|
||||||
"java/org/prism/AbstractNodeVisitor.java",
|
|
||||||
"lib/prism/compiler.rb",
|
|
||||||
"lib/prism/dispatcher.rb",
|
|
||||||
"lib/prism/dot_visitor.rb",
|
|
||||||
"lib/prism/dsl.rb",
|
|
||||||
"lib/prism/mutation_compiler.rb",
|
|
||||||
"lib/prism/node.rb",
|
|
||||||
"lib/prism/serialize.rb",
|
|
||||||
"lib/prism/visitor.rb",
|
|
||||||
"src/node.c",
|
|
||||||
"src/prettyprint.c",
|
|
||||||
"src/serialize.c",
|
|
||||||
"src/token_type.c",
|
|
||||||
"rbi/prism/node.rbi",
|
|
||||||
"rbi/prism/visitor.rbi",
|
|
||||||
"sig/prism.rbs",
|
|
||||||
"sig/prism/dsl.rbs",
|
|
||||||
"sig/prism/mutation_compiler.rbs",
|
|
||||||
"sig/prism/node.rbs",
|
|
||||||
"sig/prism/visitor.rbs",
|
|
||||||
"sig/prism/_private/dot_visitor.rbs"
|
|
||||||
]
|
|
||||||
end
|
|
||||||
=======
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
"ext/prism/api_node.c",
|
"ext/prism/api_node.c",
|
||||||
"include/prism/ast.h",
|
"include/prism/ast.h",
|
||||||
@ -687,7 +647,7 @@ module Prism
|
|||||||
"sig/prism/visitor.rbs",
|
"sig/prism/visitor.rbs",
|
||||||
"sig/prism/_private/dot_visitor.rbs"
|
"sig/prism/_private/dot_visitor.rbs"
|
||||||
]
|
]
|
||||||
>>>>>>> 35d292f929 (Expose types on diagnostics)
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if __FILE__ == $0
|
if __FILE__ == $0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user