fix platform derivation and some tests

This commit is contained in:
Torsten Ruger
2018-07-01 21:27:27 +03:00
parent bb49f1be78
commit 5f2a256608
6 changed files with 17 additions and 10 deletions

View File

@ -1,6 +1,6 @@
module Risc
class InterpreterPlatform
class InterpreterPlatform < Platform
def translator
IdentityTranslator.new
end

View File

@ -13,7 +13,13 @@ module Risc
include Util::Logging
log_level :info
def initialize
def initialize(platform)
if(platform.is_a?(Symbol))
platform = platform.to_s.capitalize
platform = Risc::Platform.for(platform)
end
raise "Platform must be platform, not #{platform.class}" unless platform.is_a?(Platform)
@platform = platform
@risc_init = nil
@constants = []
end