Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program
- Block
- FuncDecl
- signature: Signature
- name: Name(value: "check_if_prime")
- parameters: [ Param
- name: Name(value: "num")
- type: Scheme
- type: Int
- generic args: None ]
- codomain: Scheme
- type: Bool
- generic args: None
- typevars: None
- body: Block
- ExprInstr
- expr: IfInstr
- cond: InfixOp
- left_operand: Name(value: "num")
- right_operand: LitExpr
- IntLit(1)
- operator: GREATER
- body: Block
- ForInstr
- for: Param
- name: Name(value: "i")
- type: Unspecified
- in: Range
- beginning: LitExpr
- IntLit(2)
- end: Name(value: "num")
- step: None
- body: Block
- ExprInstr
- expr: IfInstr
- cond: InfixOp
- left_operand: InfixOp
- left_operand: Name(value: "num")
- right_operand: Name(value: "i")
- operator: MODULO
- right_operand: LitExpr
- IntLit(0)
- operator: EQ
- body: Block
- ReturnInstr
- Name(value: "false")
- else_branch: Block()
- ExprInstr
- expr: Name(value: "true")
- else_branch: Block
- ExprInstr
- expr: Name(value: "false")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement