pyslc.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:PYSL 作者: sparkon 项目源码 文件源码
def cmpop_str(op: ast.AST) -> str:
    if isinstance(op, ast.Eq):
        return '=='
    if isinstance(op, ast.NotEq):
        return '!='
    if isinstance(op, ast.Lt):
        return '<'
    if isinstance(op, ast.LtE):
        return '<='
    if isinstance(op, ast.Gt):
        return '>'
    if isinstance(op, ast.GtE):
        return '>='
    error(loc(op), "Invalid compare operator encountered: {0}:{1}. Check supported intrisics.".format(op.lineno, op.col_offset))
    return 'INVALID_CMPOP'


# Parsers
# ------------------------------------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号