Fix some stuff
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Dominic Grimm 2022-07-09 17:42:32 +02:00
parent 3214561634
commit dbbb7949e8
No known key found for this signature in database
GPG key ID: A6C051C716D2CE65
3 changed files with 5 additions and 1 deletions

View file

@ -5,7 +5,7 @@ name: default
steps: steps:
- name: ameba - name: ameba
image: veelenga/ameba image: veelenga/ameba:latest
commands: commands:
- ameba src/ - ameba src/
- name: build - name: build

View file

@ -82,6 +82,7 @@ module Hence
) )
end end
# ameba:disable Metrics/CyclomaticComplexity
def get_register(index : UInt8) : UInt16 def get_register(index : UInt8) : UInt16
case index case index
when 0x0_u8 when 0x0_u8
@ -121,6 +122,7 @@ module Hence
end end
end end
# ameba:disable Metrics/CyclomaticComplexity
def set_register(index : UInt8, value : UInt16) : UInt16 def set_register(index : UInt8, value : UInt16) : UInt16
case index case index
when 0x0_u8 when 0x0_u8
@ -160,6 +162,7 @@ module Hence
end end
end end
# ameba:disable Metrics/CyclomaticComplexity
def alu(op : UInt8) : UInt16 def alu(op : UInt8) : UInt16
case op case op
when 0x00 # not when 0x00 # not

View file

@ -4,6 +4,7 @@ module Hence
module Parser module Parser
extend self extend self
# ameba:disable Metrics/CyclomaticComplexity
def parse(source : String) : AST def parse(source : String) : AST
s = StringScanner.new(source.gsub(/;.*|@.*|#.*/, nil)) s = StringScanner.new(source.gsub(/;.*|@.*|#.*/, nil))
body = [] of AST::Node body = [] of AST::Node