Internal code reorganization.
- Separate library loading code into a new module. parser.__init__() no longer loads the library; it accepts (but does not depend on) a library as a parameter. - Add an optional library argument to parse(). It's no longer mandatory to create a new parser for switching to a different builtins or seftable file. - Move warning() and types from lslparse to lslcommon. - Add .copy() to uses of base_keywords, to not rely on it being a frozen set. - Adjust the test suite.
This commit is contained in:
@@ -18,11 +18,10 @@
|
||||
# Constant folding and simplification of expressions and statements.
|
||||
|
||||
import lslcommon
|
||||
from lslcommon import Vector, Quaternion
|
||||
from lslcommon import Vector, Quaternion, warning
|
||||
import lslfuncs
|
||||
from lslfuncs import ZERO_VECTOR, ZERO_ROTATION
|
||||
import math
|
||||
from lslparse import warning
|
||||
from lslfuncopt import OptimizeFunc, OptimizeArgs, FuncOptSetup
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user