Changeset 2980


Ignore:
Timestamp:
Mar 28, 2013, 6:27:16 PM (5 years ago)
Author:
ksherdy
Message:

Added pablo.Mask(fw,n) to operation to translation script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/py2pablo.py

    r2383 r2980  
    33#
    44# Quick and dirty script to automate the translation of
    5 # 'Pablo' Python language syntax to 'Pablo' Pablo language syntax.
     5# 'Pablo' Python language syntax to 'PabloS' language syntax.
    66#
    77import unparse, ast, sys
     
    191191            if not self.inClassDef:
    192192                self.write(" = ")
    193         if not self.inClassDef:       
    194             self.dispatch(t.value)
     193        if not self.inClassDef: 
     194                if isinstance(t.value, ast.Num) and isinstance(t.value.n, int) and t.value.n == 0:
     195                                                self.write("pablo.Mask(1," + str(t.value.n) + ")")
     196                else:     
     197                        self.dispatch(t.value)
    195198        self.write(";")       
    196199       
Note: See TracChangeset for help on using the changeset viewer.