parser: use TrueDivision instead of the broken Division
This commit is contained in:
parent
8f26b393d1
commit
b27faf974f
1 changed files with 3 additions and 3 deletions
|
|
@ -6,8 +6,8 @@ from typing import Callable
|
|||
from .errors import CompilationError, UnexpectedTokenError
|
||||
from .lexer import Tokens, Token
|
||||
from .logger import Logger, Tracer, LogLevel
|
||||
from .nodes import Float, Sum, Value, Product, Node, Division, Sub, Integer, Expression, Identifier, Assignment, \
|
||||
Variable, Statement, PseudoNode, Block, Definition, Call
|
||||
from .nodes import Float, Sum, Value, Product, Node, Sub, Integer, Expression, Identifier, Assignment, \
|
||||
Variable, Statement, PseudoNode, Block, Definition, Call, TrueDivision
|
||||
|
||||
logger = Logger(__name__)
|
||||
tracer = Tracer(logger, level=LogLevel.Debug)
|
||||
|
|
@ -146,7 +146,7 @@ class Parser:
|
|||
def term(self, mandatory: bool = False) -> Value:
|
||||
return self.binary_op(self.factor, operators={
|
||||
Tokens.Op_Multiply: Product,
|
||||
Tokens.Op_Divide: Division,
|
||||
Tokens.Op_Divide: TrueDivision,
|
||||
}, mandatory=mandatory)
|
||||
|
||||
@tracer.trace_method
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue