diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-25 17:54:16 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-25 17:55:29 -0400 |
commit | c21fc77e9f22694c60bbfec16b165bd075093530 (patch) | |
tree | 12e9212345669e1f7b9f2f863acdc866b2e35b94 | |
parent | b5860623b42bdbe17633c95a5eec2e31cd7d384f (diff) |
oasm: lex: lex_is_mro() -> tok_is_mro()
Improve naming consistency
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | usr.bin/oasm/emit.c | 2 | ||||
-rw-r--r-- | usr.bin/oasm/include/oasm/lex.h | 2 | ||||
-rw-r--r-- | usr.bin/oasm/parse.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/oasm/emit.c b/usr.bin/oasm/emit.c index 139cf47..6b17eab 100644 --- a/usr.bin/oasm/emit.c +++ b/usr.bin/oasm/emit.c @@ -471,7 +471,7 @@ emit_process(struct oasm_state *oasm, struct emit_state *emit) curtok = emit_encode_hlt(emit, curtok); break; default: - if (lex_is_mro(curtok->type)) { + if (tok_is_mro(curtok->type)) { curtok = emit_encode_mro(emit, curtok); break; } diff --git a/usr.bin/oasm/include/oasm/lex.h b/usr.bin/oasm/include/oasm/lex.h index 375771e..873f6b9 100644 --- a/usr.bin/oasm/include/oasm/lex.h +++ b/usr.bin/oasm/include/oasm/lex.h @@ -167,7 +167,7 @@ tok_is_xreg(tt_t tok) * instruction. Returns true on match. */ __always_inline static inline bool -lex_is_mro(tt_t tok) +tok_is_mro(tt_t tok) { switch (tok) { case TT_MROB: diff --git a/usr.bin/oasm/parse.c b/usr.bin/oasm/parse.c index 69c21f9..3389802 100644 --- a/usr.bin/oasm/parse.c +++ b/usr.bin/oasm/parse.c @@ -127,7 +127,7 @@ parse_reg(struct oasm_state *state, struct oasm_token *tok) state->last = tok->type; break; default: - if (lex_is_mro(state->last)) { + if (tok_is_mro(state->last)) { state->last = tok->type; break; } @@ -205,7 +205,7 @@ parse_tok(struct oasm_state *state, struct oasm_token *tok) emit_osmx64(&emit_state, tok); break; default: - if (lex_is_mro(tok->type)) { + if (tok_is_mro(tok->type)) { state->last = tok->type; emit_osmx64(&emit_state, tok); return 0; |