Skip to content
  • Damien George's avatar
    py: Move constant folding from compiler to parser. · 64f2b213
    Damien George authored
    It makes much more sense to do constant folding in the parser while the
    parse tree is being built.  This eliminates the need to create parse
    nodes that will just be folded away.  The code is slightly simpler and a
    bit smaller as well.
    Constant folding now has a configuration option,
    MICROPY_COMP_CONST_FOLDING, which is enabled by default.