1
0
mirror of https://github.com/safiire/n65.git synced 2024-06-10 15:29:53 +00:00

Linted regexes.rb

This commit is contained in:
Saf 2020-08-30 13:04:07 -07:00
parent 9acca01731
commit d3ed4e81ec

View File

@ -1,15 +1,14 @@
# frozen_string_literal: true
module N65
####
## All the regexes used to parse in one module
# All the regexes used to parse in one module
module Regexes
## Mnemonics
# rubocop:disable Naming/ConstantName
# Mnemonics
Mnemonic = '([A-Za-z]{3})'
Branches = '(BPL|BMI|BVC|BVS|BCC|BCS|BNE|BEQ|bpl|bmi|bvc|bvs|bcc|bcs|bne|beq)'
## Numeric Literals
# Numeric Literals
Hex8 = '\$([A-Fa-f0-9]{1,2})'
Hex16 = '\$([A-Fa-f0-9]{3,4})'
@ -21,13 +20,13 @@ module N65
Immediate = "\##{Num8}"
## Symbols, must begin with a letter, and supports dot syntax
# Symbols, must begin with a letter, and supports dot syntax
Sym = '([a-zA-Z][a-zA-Z\d_\.]*(?:[\+\-\*\/]\d+)*)'
## The X or Y register
# The X or Y register
XReg = '[Xx]'
YReg = '[Yy]'
end
# rubocop:enable Naming/ConstantName
end
end