expression originated.
The way that source properties are stored means that Guile cannot
-associate source properties with individual numbers, symbols,
-characters, booleans, or keywords. This can be seen by typing
+associate source properties with individual symbols, keywords,
+characters, booleans, or small integers. This can be seen by typing
@code{(xxx)} and @code{xxx} at the Guile prompt (where the variable
@code{xxx} has not been defined):
int overflow;
scm_t_port *pt = SCM_PTAB_ENTRY (port);
+ /* Need to capture line and column numbers here. */
+ long line = SCM_LINUM (port);
+ int column = SCM_COL (port) - 1;
+
scm_ungetc (chr, port);
overflow = read_complete_token (port, buffer, sizeof (buffer),
&overflow_buffer, &bytes_read);
pt->ilseq_handler);
result = scm_string_to_number (str, SCM_UNDEFINED);
- if (!scm_is_true (result))
+ if (scm_is_false (result))
{
/* Return a symbol instead of a number */
if (SCM_CASE_INSENSITIVE_P)
str = scm_string_downcase_x (str);
result = scm_string_to_symbol (str);
}
+ else if (SCM_NIMP (result))
+ result = maybe_annotate_source (result, port, line, column);
if (overflow)
free (overflow_buffer);