Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix doc:vm:html task to not fail if yaml file missing

  • Loading branch information...
commit 05571131c540e32a40856dd7ba61d8ed58da3797 1 parent 3904ff2
Adam Gardiner agardiner authored
Showing with 4 additions and 3 deletions.
  1. +2 −1  Rakefile
  2. +2 −2 doc/vm/op_code_info.rb
3  Rakefile
View
@@ -975,11 +975,12 @@ namespace "doc" do
OpCode::Info.op_codes.each do |op|
html = "doc/vm/op_codes/#{op}.html"
yaml = "doc/vm/op_codes/#{op}.yaml"
- file html => yaml do
+ file html do
cd 'doc/vm' do
ruby "gen_op_code_html.rb #{op}"
end
end
+ file html => yaml if File.exists?("doc/vm/op_codes/#{op}.yaml")
task "html" => html
end
4 doc/vm/op_code_info.rb
View
@@ -47,8 +47,8 @@ def initialize(mnemonic)
def args
fmt = (@yaml['format'] || @mnemonic.to_s).split(' ')
fmt.shift
- fmt <<= @opcode.args[0] if fmt.size == 0 && arg_count >= 1
- fmt <<= @opcode.args[1] if fmt.size == 1 && arg_count == 2
+ fmt <<= @op_code.args[0] if fmt.size == 0 && arg_count >= 1
+ fmt <<= @op_code.args[1] if fmt.size == 1 && arg_count == 2
fmt
end
Please sign in to comment.
Something went wrong with that request. Please try again.