Fix: normand.py: accept floating point number variable v0.6.1
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 29 Sep 2023 20:20:04 +0000 (16:20 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 29 Sep 2023 20:22:05 +0000 (16:22 -0400)
Change-Id: I6681cedabaaf458245bfa72495c7619960d260da
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
normand/normand.py
pyproject.toml
tests/pass-var-float.nt [new file with mode: 0644]

index c643429012be389d2433df9a2db687e00d7fb71b..9a950619177dff1a6f747908bea3a849db1d1b74 100644 (file)
@@ -30,7 +30,7 @@
 # Upstream repository: <https://github.com/efficios/normand>.
 
 __author__ = "Philippe Proulx"
-__version__ = "0.6.0"
+__version__ = "0.6.1"
 __all__ = [
     "ByteOrder",
     "parse",
@@ -1558,7 +1558,7 @@ class _Gen:
         self, item: _VarAssign, state: _GenState, next_vl_instance: int
     ):
         # Update variable
-        state.variables[item.name] = self._eval_item_expr(item, state, True)
+        state.variables[item.name] = self._eval_item_expr(item, state, True, True)
         return next_vl_instance
 
     # Handles the fixed-length integer item `item`.
index 3eb704defe390c6c516d6fb8a3f2cdebacbf3213..1b41fed35cbf6ec06bb3585444aa540e55d7e130 100644 (file)
@@ -23,7 +23,7 @@
 
 [tool.poetry]
 name = 'normand'
-version = '0.6.0'
+version = '0.6.1'
 description = 'Text-to-binary processor with its own language'
 license = 'MIT'
 authors = ['Philippe Proulx <eeppeliteloop@gmail.com>']
diff --git a/tests/pass-var-float.nt b/tests/pass-var-float.nt
new file mode 100644 (file)
index 0000000..c66ac10
--- /dev/null
@@ -0,0 +1,3 @@
+{be} aa {meow = 32.5} bb {meow : 32} cc
+---
+aa bb 42 02 00 00 cc
This page took 0.025555 seconds and 4 git commands to generate.