This commit is contained in:
parent
3214561634
commit
dbbb7949e8
3 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue