aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Lockwood2021-06-29 20:58:54 -0400
committerAlexis Lockwood2021-06-29 20:58:54 -0400
commit7b8438eebc9b000ce362580820ce3c185d4367e7 (patch)
tree14cf9ee7cc273dc3b1279a0dfd3dea3f5c673713
parent6553f2f6253f7843b62c413274a1f649893abfff (diff)
Use ls_int_t, fix a bad comment in readme
-rw-r--r--README.md2
-rw-r--r--src/ls.h2
-rw-r--r--src/ls_lex.c2
-rw-r--r--src/ls_types.h4
4 files changed, 4 insertions, 6 deletions
diff --git a/README.md b/README.md
index cd4d172..f8732bd 100644
--- a/README.md
+++ b/README.md
@@ -284,8 +284,6 @@ erasing any unused variables.
If the iterator does not land directly on `b` because of the step size,
iteration stops when it passes `b`.
`
-Start and end values are restricted to signed 16 bit.
-
### `GOSUB f[(args...)] [AS s]`
Pushes a new stack frame and jumps to label `f`. Label must be named, not
diff --git a/src/ls.h b/src/ls.h
index af59008..53e282d 100644
--- a/src/ls.h
+++ b/src/ls.h
@@ -88,7 +88,7 @@ typedef struct ls_s {
/// Value of the last read token
union {
char word[LS_IDENT_OR_KW_LEN + 1];
- int32_t number;
+ ls_int_t number;
ls_addr_t string[2];
} _token;
} ls_t;
diff --git a/src/ls_lex.c b/src/ls_lex.c
index f52e037..e685f37 100644
--- a/src/ls_lex.c
+++ b/src/ls_lex.c
@@ -264,7 +264,7 @@ static ls_token_t _lex_num(ls_t * self, ls_uchar ch[2])
{
uint8_t radix = 10;
ls_token_t tok = LS_TOK_NUMBER;
- int32_t val = 0;
+ ls_int_t val = 0;
if (ch[0] == '&')
{
diff --git a/src/ls_types.h b/src/ls_types.h
index 8580cf3..9e8d899 100644
--- a/src/ls_types.h
+++ b/src/ls_types.h
@@ -167,9 +167,9 @@ typedef struct {
/// be the only variable.
typedef struct {
/// Terminating value
- int32_t term;
+ ls_int_t term;
/// Step value
- int32_t step;
+ ls_int_t step;
} ls_ty_sctx_for_t;
/// WHILE loop stackframe. The NEXT pointer is not used here --- WHILE loops