diff --git a/shard.yml b/shard.yml index 05dd360..741cfb5 100644 --- a/shard.yml +++ b/shard.yml @@ -8,7 +8,7 @@ targets: hence: main: src/cli/hence.cr -crystal: 1.4.1 +crystal: 1.5.0 license: MIT diff --git a/src/hence/parser.cr b/src/hence/parser.cr index 3c0147a..ac973d3 100644 --- a/src/hence/parser.cr +++ b/src/hence/parser.cr @@ -180,12 +180,12 @@ module Hence def initialize(@number : UInt16) end - def resolve(_data : Assembler::Data) : Bytes + def resolve(data : Assembler::Data) : Bytes n = Utils.split_u16(@number) Bytes[n[0], n[1]] end - def resolve_as_number(_data : Assembler::Data) : UInt16 + def resolve_as_number(data : Assembler::Data) : UInt16 @number end @@ -219,11 +219,11 @@ module Hence def initialize(@bytes : Bytes) end - def resolve(_data : Assembler::Data) : Bytes + def resolve(data : Assembler::Data) : Bytes @bytes end - def resolve_as_number(_data : Assembler::Data) : UInt16 + def resolve_as_number(data : Assembler::Data) : UInt16 if @bytes.size == 1 @bytes[0].to_u16 else @@ -242,7 +242,7 @@ module Hence def initialize(@string : String) end - def resolve(_data : Assembler::Data) : Bytes + def resolve(data : Assembler::Data) : Bytes if @string.bytesize == 1 Bytes[0_u8, @string.bytes[0]] else @@ -250,8 +250,8 @@ module Hence end end - def resolve_as_number(_data : Assembler::Data) : UInt16 - slice = resolve(_data) + def resolve_as_number(data : Assembler::Data) : UInt16 + slice = resolve(data) Utils.merge_u8(slice[0], slice[1]) end