asm: fix compiler warnings
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
#include "parse.h"
|
||||
#include <ivy/ident.h>
|
||||
#include <ivy/asm/bin.h>
|
||||
|
||||
#include <ivy/asm/assembler.h>
|
||||
#include <ivy/asm/bin.h>
|
||||
#include <ivy/asm/lex.h>
|
||||
#include <ivy/ident.h>
|
||||
|
||||
struct atom_parser_state {
|
||||
struct parser_state s_base;
|
||||
unsigned int s_prev_token;
|
||||
|
||||
|
||||
struct ivy_asm_token *s_name;
|
||||
};
|
||||
|
||||
static enum ivy_status init_state(
|
||||
struct ivy_asm_parser *ctx, struct parser_state *s)
|
||||
static void init_state(struct ivy_asm_parser *ctx, struct parser_state *s)
|
||||
{
|
||||
struct atom_parser_state *state = (struct atom_parser_state *)s;
|
||||
state->s_prev_token = IVY_ASM_SYM_LEFT_PAREN;
|
||||
return IVY_OK;
|
||||
}
|
||||
|
||||
static enum ivy_status parse_ident(
|
||||
struct ivy_asm_parser *ctx, struct ivy_asm_token *tok)
|
||||
{
|
||||
struct atom_parser_state *state = (struct atom_parser_state *)asm_parser_get_state(ctx);
|
||||
struct atom_parser_state *state
|
||||
= (struct atom_parser_state *)asm_parser_get_state(ctx);
|
||||
if (state->s_prev_token != IVY_ASM_SYM_LEFT_PAREN) {
|
||||
return IVY_ERR_BAD_SYNTAX;
|
||||
}
|
||||
@@ -40,7 +40,8 @@ static enum ivy_status parse_ident(
|
||||
static enum ivy_status parse_right_paren(
|
||||
struct ivy_asm_parser *ctx, struct ivy_asm_token *tok)
|
||||
{
|
||||
struct atom_parser_state *state = (struct atom_parser_state *)asm_parser_get_state(ctx);
|
||||
struct atom_parser_state *state
|
||||
= (struct atom_parser_state *)asm_parser_get_state(ctx);
|
||||
|
||||
if (state->s_prev_token != IVY_ASM_TOK_IDENT) {
|
||||
return IVY_ERR_BAD_SYNTAX;
|
||||
@@ -63,4 +64,4 @@ struct parser_state_type atom_parser_state_type = {
|
||||
.n_symbol_parsers = {
|
||||
SYM_PARSER(RIGHT_PAREN, parse_right_paren),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user