Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
5fa5ae40
Commit
5fa5ae40
authored
Oct 06, 2013
by
Damien
Browse files
Make range of small int 24 bits.
parent
39cf3285
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/parse.c
View file @
5fa5ae40
...
...
@@ -228,7 +228,7 @@ static void push_result_token(parser_t *parser, const py_lexer_t *lex) {
}
if
(
dec
)
{
pn
=
py_parse_node_new_leaf
(
PY_PARSE_NODE_DECIMAL
,
qstr_from_strn_copy
(
str
,
len
));
}
else
if
(
small_int
&&
-
0x
100
00000
<=
int_val
&&
int_val
<=
0x
ff
fffff
)
{
// XXX check this range formula!
}
else
if
(
small_int
&&
-
0x
8
00000
<=
int_val
&&
int_val
<=
0x
7
fffff
)
{
// XXX check this range formula!
pn
=
py_parse_node_new_leaf
(
PY_PARSE_NODE_SMALL_INT
,
int_val
);
}
else
{
pn
=
py_parse_node_new_leaf
(
PY_PARSE_NODE_INTEGER
,
qstr_from_strn_copy
(
str
,
len
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment