aboutsummaryrefslogtreecommitdiff
path: root/src/ls_kw_impl_GOTO.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ls_kw_impl_GOTO.c')
-rw-r--r--src/ls_kw_impl_GOTO.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ls_kw_impl_GOTO.c b/src/ls_kw_impl_GOTO.c
index c349fc1..cbabeb0 100644
--- a/src/ls_kw_impl_GOTO.c
+++ b/src/ls_kw_impl_GOTO.c
@@ -24,40 +24,40 @@
// --- PRIVATE VARIABLES -------------------------------------------------------
// --- PUBLIC FUNCTIONS --------------------------------------------------------
-void ls_kw_fun_GOTO(ls_context_t * ctx)
+void ls_kw_fun_GOTO(ls_t * self)
{
// Allowed syntax:
// GOTO ident
// GOTO +num
// GOTO -num
ls_token_t tok;
- ls_lex(ctx, &tok);
+ ls_lex(self, &tok);
bool backward = false;
switch (tok.ty)
{
case LS_TOK_WORD:
- ls_goto_ident(ctx, tok.body.word_val);
+ ls_goto_ident(self, tok.body.word_val);
break;
case LS_TOK_OPERATOR:
if (tok.body.oper_val == OPER_SUB)
backward = true;
else if (tok.body.oper_val != OPER_ADD)
- ls_throw_err(ctx, LS_SYNTAX_ERROR);
+ ls_throw_err(self, LS_SYNTAX_ERROR);
- ls_lex(ctx, &tok);
+ ls_lex(self, &tok);
if (tok.ty != LS_TOK_NUMBER)
- ls_throw_err(ctx, LS_SYNTAX_ERROR);
+ ls_throw_err(self, LS_SYNTAX_ERROR);
if (tok.body.number_val > UINT16_MAX
|| tok.body.number_val < 0)
- ls_throw_err(ctx, LS_SYNTAX_ERROR);
+ ls_throw_err(self, LS_SYNTAX_ERROR);
- ls_goto_num(ctx, backward, (uint16_t)(tok.body.number_val));
+ ls_goto_num(self, backward, (uint16_t)(tok.body.number_val));
break;
default:
- ls_throw_err(ctx, LS_SYNTAX_ERROR);
+ ls_throw_err(self, LS_SYNTAX_ERROR);
}
}