Commit c919c104 authored by Tom Niget's avatar Tom Niget

Add support for float literals

parent a1a9860c
......@@ -7,7 +7,7 @@ from transpiler.phases.typing import ScopeKind, VarDecl, VarKind
from transpiler.phases.typing.common import ScoperVisitor, get_iter, get_next
from transpiler.phases.typing.types import BaseType, TupleType, TY_STR, TY_BOOL, TY_INT, \
TY_COMPLEX, TY_NONE, FunctionType, PyList, TypeVariable, PySet, TypeType, PyDict, Promise, PromiseKind, UserType, \
TY_SLICE
TY_SLICE, TY_FLOAT
from transpiler.utils import linenodata
DUNDER = {
......@@ -80,6 +80,8 @@ class ScoperExprVisitor(ScoperVisitor):
return TY_INT
elif isinstance(node.value, complex):
return TY_COMPLEX
elif isinstance(node.value, float):
return TY_FLOAT
elif node.value is None:
return TY_NONE
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment