Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
Implement instanceof.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Apr 13, 2012
1 parent 8ba028b commit 2d346cd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/furnace-avm2/source/decompiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ def expr_is_type_late(opcode)
token(IsToken, parenthesize_each(exprs(opcode.children)))
end

def expr_instance_of(opcode)
token(InstanceOfToken, parenthesize_each(exprs(opcode.children)))
end

def expr_type_of(opcode)
token(TypeOfToken, exprs(opcode.children))
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Furnace::AVM2::Tokens
class InstanceOfToken < Furnace::Code::SeparatedToken
include IsComplex

def text_between
" instanceof "
end
end
end

0 comments on commit 2d346cd

Please sign in to comment.